public class CloudQueueMessage extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
messageContent
Holds the message content.
|
Modifier | Constructor and Description |
---|---|
protected |
CloudQueueMessage()
Initializes a new instance of the
CloudQueueMessage class (used internally). |
|
CloudQueueMessage(byte[] content)
Initializes a new instance of the
CloudQueueMessage class with a byte
array containing the message. |
|
CloudQueueMessage(String content)
Initializes a new instance of the
CloudQueueMessage class with a String
containing the message. |
Modifier and Type | Method and Description |
---|---|
int |
getDequeueCount()
Gets the dequeue count.
|
Date |
getExpirationTime()
Gets the time that the message expires.
|
String |
getId()
Gets the message ID.
|
Date |
getInsertionTime()
Gets the time the message was added to the queue.
|
byte[] |
getMessageContentAsByte()
Gets the content of the message as a byte array.
|
String |
getMessageContentAsString()
Gets the content of the message as a string.
|
protected String |
getMessageContentForTransfer(boolean shouldEncodeMessage,
QueueRequestOptions options)
Gets the content of the message for transfer (internal use only).
|
String |
getMessageId()
Gets the message ID.
|
protected com.microsoft.azure.storage.queue.QueueMessageType |
getMessageType()
Gets the message type.
|
Date |
getNextVisibleTime()
Gets the time that the message will next be visible.
|
String |
getPopReceipt()
Gets the message's pop receipt.
|
protected void |
setDequeueCount(int dequeueCount)
Sets the dequeue count.
|
protected void |
setExpirationTime(Date expirationTime)
Sets the expiration time for the message.
|
protected void |
setInsertionTime(Date insertionTime)
Sets the
java.util.Date representing the time the message was added to the queue. |
void |
setMessageContent(byte[] content)
Sets the content of the message as a
byte array. |
void |
setMessageContent(String content)
Sets the content of the message as a
String . |
protected void |
setMessageId(String id)
Sets the message ID.
|
protected void |
setMessageType(com.microsoft.azure.storage.queue.QueueMessageType messageType)
Sets the message's type
|
protected void |
setNextVisibleTime(Date nextVisibleTime)
Sets the time for the message to become visible in the queue.
|
protected void |
setPopReceipt(String popReceipt)
Sets the message's pop receipt.
|
protected String messageContent
protected CloudQueueMessage()
CloudQueueMessage
class (used internally).public CloudQueueMessage(byte[] content)
CloudQueueMessage
class with a byte
array containing the message.content
- A byte
array which contains the message.public CloudQueueMessage(String content)
CloudQueueMessage
class with a String
containing the message.content
- A String
which contains the message.public final int getDequeueCount()
int
which contains the dequeue count.public final Date getExpirationTime()
java.util.Date
object which represents the time that the message expires.public final String getId()
String
which contains the message ID.public final Date getInsertionTime()
java.util.Date
which represents the time the message was added to the queue.public final byte[] getMessageContentAsByte() throws StorageException
byte
array which contains the content of the message.StorageException
- If a storage service error occurred.public final String getMessageContentAsString() throws StorageException
String
which contains the content of the message.StorageException
- If a storage service error occurred.protected final String getMessageContentForTransfer(boolean shouldEncodeMessage, QueueRequestOptions options) throws StorageException
shouldEncodeMessage
- Indicates if the message should be encoded.options
- A QueueRequestOptions
object that specifies additional options for the request.String
which contains the content of the message.StorageException
- If a storage service error occurred.public final String getMessageId()
String
which contains the message ID.protected final com.microsoft.azure.storage.queue.QueueMessageType getMessageType()
QueueMessageType
value which represents the message type.public final Date getNextVisibleTime()
java.util.Date
with the time that the message will
next be visible.public final String getPopReceipt()
String
which contains the message's pop receipt.protected final void setDequeueCount(int dequeueCount)
dequeueCount
- An int
which contains the dequeue count.protected final void setExpirationTime(Date expirationTime)
expirationTime
- The java.util.Date
which represents the expiration time to set on the message.protected final void setInsertionTime(Date insertionTime)
java.util.Date
representing the time the message was added to the queue.insertiontTime
- The java.util.Date
representing the time the message was added to the queue.public final void setMessageContent(byte[] content)
byte
array.content
- A byte
array which contains the content of the message.public final void setMessageContent(String content)
String
.content
- A String
which contains the content of the message.protected final void setMessageId(String id)
id
- A String
which represents the message ID.protected final void setMessageType(com.microsoft.azure.storage.queue.QueueMessageType messageType)
messageType
- A QueueMessageType
value which represents the message type.protected final void setNextVisibleTime(Date nextVisibleTime)
nextVisibleTime
- A java.util.Date
with the time that the message will
next be visible.protected final void setPopReceipt(String popReceipt)
popReceipt
- A String
which contains the message's pop receipt.Copyright © 2019. All rights reserved.