|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IQueue
Objects of this class represent a queue in a user's storage account.
| Field Summary | |
|---|---|
static int |
DEFAULT_POLL_INTERVAL
The default time interval between polling the queue for messages. |
| Method Summary | |
|---|---|
void |
addMessageReceivedListener(IMessageReceivedListener listener)
Adds the listener to the collection of listeners who will be notified when a new message is put into the queue. |
boolean |
clear()
Delete all messages in a queue. |
boolean |
createQueue()
Creates a queue in the specified storage account. |
boolean |
deleteMessage(IMessage msg)
Deletes a message from the queue. |
boolean |
deleteQueue()
Deletes the queue. |
StorageAccountInfo |
getAccount()
Returns the account info object this queue lives in. |
int |
getApproximateCount()
Retrieves the approximate number of messages in a queue. |
java.lang.String |
getLastStatus()
Return the last status of the queue. |
IMessage |
getMessage()
Retrieves a message from the queue. |
IMessage |
getMessage(int visibilityTimeoutInSeconds)
Retrieves a message and sets its visibility timeout to the specified number of seconds. |
java.util.List<org.soyatec.windowsazure.queue.internal.Message> |
getMessages(int numberOfMessages)
Tries to retrieve the given number of messages. |
java.util.List<org.soyatec.windowsazure.queue.internal.Message> |
getMessages(int numberOfMessages,
int visibilityTimeoutInSeconds)
Tries to retrieve the given number of messages. |
java.lang.String |
getName()
Returns the name of this queue. |
int |
getPollInterval()
Return the poll interval of checking new messages in milliseconds. |
IQueueProperties |
getProperties()
Retrieves the queue's properties. |
java.net.URI |
getQueueUri()
Return the URI of the queue. |
IRetryPolicy |
getRetryPolicy()
Returns the retry policy used for retrying requests. |
org.soyatec.windowsazure.internal.util.TimeSpan |
getTimeout()
Returns the timeout of requests. |
boolean |
isQueueExist()
Determines whether a queue with the same name already exists in an account. |
boolean |
isUsePathStyleUris()
Returns whether to use/generate path-style or host-style URIs. |
IMessage |
peekMessage()
Get a message from the queue but do not actually dequeue it. |
java.util.List<org.soyatec.windowsazure.queue.internal.Message> |
peekMessages(int numberOfMessages)
Tries to get a copy of messages in the queue without actually dequeuing the messages. |
boolean |
putMessage(IMessage msg)
Puts a message in the queue. |
boolean |
putMessage(IMessage msg,
int timeToLiveInSeconds)
Puts a message in the queue. |
void |
removeMessageReceivedListener(IMessageReceivedListener listener)
Removes the listener from the collection of listeners who will when a new message is put into the queue. |
void |
setPollInterval(int pollInterval)
Specify the poll interval of checking new messages in milliseconds. |
boolean |
setProperties(IQueueProperties properties)
Sets the properties of a queue. |
void |
setQueueUri(java.net.URI uri)
Set the URI of the queue |
void |
setRetryPolicy(IRetryPolicy retryPolicy)
Specify the retry policy used for retrying requests. |
void |
setTimeout(org.soyatec.windowsazure.internal.util.TimeSpan timeout)
Specify the timeout of requests. |
boolean |
startReceiving()
Starts the automatic receiving messages. |
void |
stopReceiving()
Stop the automatic receiving messages. |
| Field Detail |
|---|
static final int DEFAULT_POLL_INTERVAL
startReceiving() .
| Method Detail |
|---|
boolean createQueue()
throws StorageException
StorageException - If queue is exist, a StorageException is throwed.boolean isQueueExist()
boolean deleteQueue()
throws StorageException
StorageException
boolean setProperties(IQueueProperties properties)
throws StorageException
properties - The queue's properties to set.
StorageException
IQueueProperties getProperties()
throws StorageException
StorageException
int getApproximateCount()
throws StorageException
StorageException
boolean putMessage(IMessage msg)
throws StorageException
msg - The message to store in the queue.
StorageException
boolean putMessage(IMessage msg,
int timeToLiveInSeconds)
throws StorageException
msg - The message to store in the queue.timeToLiveInSeconds - The time to live for the message in seconds.
StorageException
IMessage getMessage()
throws StorageException
StorageException
IMessage getMessage(int visibilityTimeoutInSeconds)
throws StorageException
visibilityTimeoutInSeconds - Visibility timeout of the message retrieved in seconds.
StorageException
java.util.List<org.soyatec.windowsazure.queue.internal.Message> getMessages(int numberOfMessages)
throws StorageException
numberOfMessages - Maximum number of messages to retrieve.
StorageException
java.util.List<org.soyatec.windowsazure.queue.internal.Message> getMessages(int numberOfMessages,
int visibilityTimeoutInSeconds)
throws StorageException
numberOfMessages - Maximum number of messages to retrieve.visibilityTimeoutInSeconds - The visibility timeout of the retrieved messages in seconds.
StorageException
IMessage peekMessage()
throws StorageException
StorageException
java.util.List<org.soyatec.windowsazure.queue.internal.Message> peekMessages(int numberOfMessages)
throws StorageException
numberOfMessages - Maximum number of message to retrieve.
StorageException
boolean deleteMessage(IMessage msg)
throws StorageException
msg - The message to retrieve with a valid popreceipt.
StorageException
boolean clear()
throws StorageException
StorageExceptionboolean startReceiving()
void stopReceiving()
void addMessageReceivedListener(IMessageReceivedListener listener)
listener - the listener which should be notifiedvoid removeMessageReceivedListener(IMessageReceivedListener listener)
listener - the listener which should no longer be notifiedjava.lang.String getName()
StorageAccountInfo getAccount()
boolean isUsePathStyleUris()
java.net.URI getQueueUri()
void setQueueUri(java.net.URI uri)
uri - IRetryPolicy getRetryPolicy()
void setRetryPolicy(IRetryPolicy retryPolicy)
retryPolicy - The retry policy used for retrying requests.org.soyatec.windowsazure.internal.util.TimeSpan getTimeout()
void setTimeout(org.soyatec.windowsazure.internal.util.TimeSpan timeout)
timeout - The timeout of requests.int getPollInterval()
void setPollInterval(int pollInterval)
pollInterval - The poll interval in milliseconds.java.lang.String getLastStatus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||