Package com.azure.storage.queue.models
Class QueueMessageItem
java.lang.Object
com.azure.storage.queue.models.QueueMessageItem
- All Implemented Interfaces:
com.azure.xml.XmlSerializable<QueueMessageItem>
public final class QueueMessageItem
extends Object
implements com.azure.xml.XmlSerializable<QueueMessageItem>
The object returned in the QueueMessageList array when calling Get Messages on a Queue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueueMessageItemfromXml(com.azure.xml.XmlReader xmlReader) Reads an instance of QueueMessageItem from the XmlReader.static QueueMessageItemReads an instance of QueueMessageItem from the XmlReader.com.azure.core.util.BinaryDatagetBody()Get the body property: The content of the Message.longGet the dequeueCount property: The number of times the message has been dequeued.Get the expirationTime property: The time that the Message will expire and be automatically deleted.Get the insertionTime property: The time the Message was inserted into the Queue.Get the messageId property: The Id of the Message.Deprecated.Get the popReceipt property: This value is required to delete the Message.Get the timeNextVisible property: The time that the message will again become visible in the Queue.setBody(com.azure.core.util.BinaryData body) Set the body property: The content of the Message.setDequeueCount(long dequeueCount) Set the dequeueCount property: The number of times the message has been dequeued.setExpirationTime(OffsetDateTime expirationTime) Set the expirationTime property: The time that the Message will expire and be automatically deleted.setInsertionTime(OffsetDateTime insertionTime) Set the insertionTime property: The time the Message was inserted into the Queue.setMessageId(String messageId) Set the messageId property: The Id of the Message.setMessageText(String messageText) Deprecated.usesetBody(BinaryData)instead.setPopReceipt(String popReceipt) Set the popReceipt property: This value is required to delete the Message.setTimeNextVisible(OffsetDateTime timeNextVisible) Set the timeNextVisible property: The time that the message will again become visible in the Queue.com.azure.xml.XmlWritertoXml(com.azure.xml.XmlWriter xmlWriter) com.azure.xml.XmlWriter
-
Constructor Details
-
QueueMessageItem
public QueueMessageItem()Creates an instance of QueueMessageItem.
-
-
Method Details
-
getMessageId
Get the messageId property: The Id of the Message.- Returns:
- the messageId value.
-
setMessageId
Set the messageId property: The Id of the Message.- Parameters:
messageId- the messageId value to set.- Returns:
- the QueueMessageItem object itself.
-
getInsertionTime
Get the insertionTime property: The time the Message was inserted into the Queue.- Returns:
- the insertionTime value.
-
setInsertionTime
Set the insertionTime property: The time the Message was inserted into the Queue.- Parameters:
insertionTime- the insertionTime value to set.- Returns:
- the QueueMessageItem object itself.
-
getExpirationTime
Get the expirationTime property: The time that the Message will expire and be automatically deleted.- Returns:
- the expirationTime value.
-
setExpirationTime
Set the expirationTime property: The time that the Message will expire and be automatically deleted.- Parameters:
expirationTime- the expirationTime value to set.- Returns:
- the QueueMessageItem object itself.
-
getPopReceipt
Get the popReceipt property: This value is required to delete the Message. If deletion fails using this popreceipt then the message has been dequeued by another client.- Returns:
- the popReceipt value.
-
setPopReceipt
Set the popReceipt property: This value is required to delete the Message. If deletion fails using this popreceipt then the message has been dequeued by another client.- Parameters:
popReceipt- the popReceipt value to set.- Returns:
- the QueueMessageItem object itself.
-
getTimeNextVisible
Get the timeNextVisible property: The time that the message will again become visible in the Queue.- Returns:
- the timeNextVisible value.
-
setTimeNextVisible
Set the timeNextVisible property: The time that the message will again become visible in the Queue.- Parameters:
timeNextVisible- the timeNextVisible value to set.- Returns:
- the QueueMessageItem object itself.
-
getDequeueCount
public long getDequeueCount()Get the dequeueCount property: The number of times the message has been dequeued.- Returns:
- the dequeueCount value.
-
setDequeueCount
Set the dequeueCount property: The number of times the message has been dequeued.- Parameters:
dequeueCount- the dequeueCount value to set.- Returns:
- the QueueMessageItem object itself.
-
getMessageText
Deprecated.usegetBody()instead.Get the messageText property: The content of the Message.- Returns:
- the messageText value.
-
setMessageText
Deprecated.usesetBody(BinaryData)instead.Set the messageText property: The content of the Message.- Parameters:
messageText- the messageText value to set.- Returns:
- the QueueMessageItem object itself.
-
getBody
public com.azure.core.util.BinaryData getBody()Get the body property: The content of the Message.- Returns:
- the body value.
-
setBody
Set the body property: The content of the Message.- Parameters:
body- the body value to set.- Returns:
- the QueueMessageItem object itself.
-
toXml
- Specified by:
toXmlin interfacecom.azure.xml.XmlSerializable<QueueMessageItem>- Throws:
XMLStreamException
-
toXml
public com.azure.xml.XmlWriter toXml(com.azure.xml.XmlWriter xmlWriter, String rootElementName) throws XMLStreamException - Specified by:
toXmlin interfacecom.azure.xml.XmlSerializable<QueueMessageItem>- Throws:
XMLStreamException
-
fromXml
Reads an instance of QueueMessageItem from the XmlReader.- Parameters:
xmlReader- The XmlReader being read.- Returns:
- An instance of QueueMessageItem if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
- Throws:
IllegalStateException- If the deserialized XML object was missing any required properties.XMLStreamException- If an error occurs while reading the QueueMessageItem.
-
fromXml
public static QueueMessageItem fromXml(com.azure.xml.XmlReader xmlReader, String rootElementName) throws XMLStreamException Reads an instance of QueueMessageItem from the XmlReader.- Parameters:
xmlReader- The XmlReader being read.rootElementName- Optional root element name to override the default defined by the model. Used to support cases where the model can deserialize from different root element names.- Returns:
- An instance of QueueMessageItem if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
- Throws:
IllegalStateException- If the deserialized XML object was missing any required properties.XMLStreamException- If an error occurs while reading the QueueMessageItem.
-
getBody()instead.