CloudQueueMessage Class
- java.
lang. Object - com.
microsoft. azure. storage. queue. CloudQueueMessage
- com.
public class CloudQueueMessage
Represents a message in the Microsoft Azure Queue service.
Field Summary
Modifier and Type | Field and Description |
---|---|
String |
messageContent
Holds the message content. |
Constructor Summary
Constructor | Description |
---|---|
CloudQueueMessage() |
Initializes a new instance of the class (used internally). |
CloudQueueMessage(final byte[] content) |
Initializes a new instance of the class with a array containing the message. |
CloudQueueMessage(final String content) |
Initializes a new instance of the class with a containing the message. |
Method Summary
Modifier and Type | Method and Description |
---|---|
final int |
getDequeueCount()
Gets the dequeue count. |
final Date |
getExpirationTime()
Gets the time that the message expires. |
final String |
getId()
Gets the message ID. |
final Date |
getInsertionTime()
Gets the time the message was added to the queue. |
final byte [] |
getMessageContentAsByte()
Gets the content of the message as a byte array. |
final String |
getMessageContentAsString()
Gets the content of the message as a string. |
final String |
getMessageContentForTransfer(final boolean shouldEncodeMessage, QueueRequestOptions options)
Gets the content of the message for transfer (internal use only). |
final String |
getMessageId()
Gets the message ID. |
final QueueMessageType |
getMessageType()
Gets the message type. |
final Date |
getNextVisibleTime()
Gets the time that the message will next be visible. |
final String |
getPopReceipt()
Gets the message's pop receipt. |
final void |
setDequeueCount(int dequeueCount)
Sets the dequeue count. |
final void |
setExpirationTime(final Date expirationTime)
Sets the expiration time for the message. |
final void |
setInsertionTime(Date insertionTime)
Sets the representing the time the message was added to the queue. |
final void |
setMessageContent(final byte[] content)
Sets the content of the message as a array. |
final void |
setMessageContent(final String content)
Sets the content of the message as a . |
final void |
setMessageId(String id)
Sets the message ID. |
final void |
setMessageType(final QueueMessageType messageType)
Sets the message's type |
final void |
setNextVisibleTime(final Date nextVisibleTime)
Sets the time for the message to become visible in the queue. |
final void |
setPopReceipt(final String popReceipt)
Sets the message's pop receipt. |
Field Details
messageContent
protected String messageContent
Holds the message content.
Constructor Details
CloudQueueMessage
protected CloudQueueMessage()
Initializes a new instance of the class (used internally).
CloudQueueMessage
public CloudQueueMessage(final byte[] content)
Initializes a new instance of the class with a array containing the message.
Parameters:
byte
array which contains the message.
CloudQueueMessage
public CloudQueueMessage(final String content)
Initializes a new instance of the class with a containing the message.
Parameters:
String
which contains the message.
Method Details
getDequeueCount
public final int getDequeueCount()
Gets the dequeue count.
Returns:
int
which contains the dequeue count.getExpirationTime
public final Date getExpirationTime()
Gets the time that the message expires.
Returns:
java.util.Date
object which represents the time that the message expires.getId
public final String getId()
Gets the message ID.
Returns:
String
which contains the message ID.getInsertionTime
public final Date getInsertionTime()
Gets the time the message was added to the queue.
Returns:
java.util.Date
which represents the time the message was added to the queue.getMessageContentAsByte
public final byte [] getMessageContentAsByte()
Gets the content of the message as a byte array.
Returns:
byte
array which contains the content of the message.Throws:
getMessageContentAsString
public final String getMessageContentAsString()
Gets the content of the message as a string.
Returns:
String
which contains the content of the message.Throws:
getMessageContentForTransfer
protected final String getMessageContentForTransfer(final boolean shouldEncodeMessage, QueueRequestOptions options)
Gets the content of the message for transfer (internal use only).
Parameters:
Returns:
String
which contains the content of the message.Throws:
getMessageId
public final String getMessageId()
Gets the message ID.
Returns:
String
which contains the message ID.getMessageType
protected final QueueMessageType getMessageType()
Gets the message type.
Returns:
QueueMessageType
value which represents the message type.getNextVisibleTime
public final Date getNextVisibleTime()
Gets the time that the message will next be visible.
Returns:
java.util.Date
with the time that the message will next be visible.getPopReceipt
public final String getPopReceipt()
Gets the message's pop receipt.
Returns:
String
which contains the message's pop receipt.setDequeueCount
protected final void setDequeueCount(int dequeueCount)
Sets the dequeue count.
Parameters:
int
which contains the dequeue count.
setExpirationTime
protected final void setExpirationTime(final Date expirationTime)
Sets the expiration time for the message.
Parameters:
java.util.Date
which represents the expiration time to set on the message.
setInsertionTime
protected final void setInsertionTime(Date insertionTime)
Sets the representing the time the message was added to the queue.
Parameters:
java.util.Date
representing the time the message was added to the queue.
setMessageContent
public final void setMessageContent(final byte[] content)
Sets the content of the message as a array.
Parameters:
byte
array which contains the content of the message.
setMessageContent
public final void setMessageContent(final String content)
Sets the content of the message as a .
Parameters:
String
which contains the content of the message.
setMessageId
protected final void setMessageId(String id)
Sets the message ID.
Parameters:
String
which represents the message ID.
setMessageType
protected final void setMessageType(final QueueMessageType messageType)
Sets the message's type
Parameters:
QueueMessageType
value which represents the message type.
setNextVisibleTime
protected final void setNextVisibleTime(final Date nextVisibleTime)
Sets the time for the message to become visible in the queue.
Parameters:
java.util.Date
with the time that the message will next be visible.
setPopReceipt
protected final void setPopReceipt(final String popReceipt)
Sets the message's pop receipt.
Parameters:
String
which contains the message's pop receipt.
Applies to
Azure SDK for Java