QueueMessageItem Class

  • java.lang.Object
    • com.azure.storage.queue.models.QueueMessageItem

Implements

public final class QueueMessageItem
implements XmlSerializable<QueueMessageItem>

The object returned in the QueueMessageList array when calling Get Messages on a Queue.

Constructor Summary

Constructor Description
QueueMessageItem()

Creates an instance of QueueMessageItem.

Method Summary

Modifier and Type Method and Description
static QueueMessageItem fromXml(XmlReader xmlReader)

Reads an instance of QueueMessageItem from the XmlReader.

static QueueMessageItem fromXml(XmlReader xmlReader, String rootElementName)

Reads an instance of QueueMessageItem from the XmlReader.

BinaryData getBody()

Get the body property: The content of the Message.

long getDequeueCount()

Get the dequeueCount property: The number of times the message has been dequeued.

OffsetDateTime getExpirationTime()

Get the expirationTime property: The time that the Message will expire and be automatically deleted.

OffsetDateTime getInsertionTime()

Get the insertionTime property: The time the Message was inserted into the Queue.

String getMessageId()

Get the messageId property: The Id of the Message.

String getMessageText()

Deprecated

use getBody() instead.

Get the messageText property: The content of the Message.

String getPopReceipt()

Get the popReceipt property: This value is required to delete the Message.

OffsetDateTime getTimeNextVisible()

Get the timeNextVisible property: The time that the message will again become visible in the Queue.

QueueMessageItem setBody(BinaryData body)

Set the body property: The content of the Message.

QueueMessageItem setDequeueCount(long dequeueCount)

Set the dequeueCount property: The number of times the message has been dequeued.

QueueMessageItem setExpirationTime(OffsetDateTime expirationTime)

Set the expirationTime property: The time that the Message will expire and be automatically deleted.

QueueMessageItem setInsertionTime(OffsetDateTime insertionTime)

Set the insertionTime property: The time the Message was inserted into the Queue.

QueueMessageItem setMessageId(String messageId)

Set the messageId property: The Id of the Message.

QueueMessageItem setMessageText(String messageText)

Deprecated

Set the messageText property: The content of the Message.

QueueMessageItem setPopReceipt(String popReceipt)

Set the popReceipt property: This value is required to delete the Message.

QueueMessageItem setTimeNextVisible(OffsetDateTime timeNextVisible)

Set the timeNextVisible property: The time that the message will again become visible in the Queue.

XmlWriter toXml(XmlWriter xmlWriter)
XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)

Methods inherited from java.lang.Object

Constructor Details

QueueMessageItem

public QueueMessageItem()

Creates an instance of QueueMessageItem.

Method Details

fromXml

public static QueueMessageItem fromXml(XmlReader xmlReader)

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:

XMLStreamException

- If the deserialized XML object was missing any required properties.

fromXml

public static QueueMessageItem fromXml(XmlReader xmlReader, String rootElementName)

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:

XMLStreamException

- If the deserialized XML object was missing any required properties.

getBody

public BinaryData getBody()

Get the body property: The content of the Message.

Returns:

the body value.

getDequeueCount

public long getDequeueCount()

Get the dequeueCount property: The number of times the message has been dequeued.

Returns:

the dequeueCount value.

getExpirationTime

public OffsetDateTime getExpirationTime()

Get the expirationTime property: The time that the Message will expire and be automatically deleted.

Returns:

the expirationTime value.

getInsertionTime

public OffsetDateTime getInsertionTime()

Get the insertionTime property: The time the Message was inserted into the Queue.

Returns:

the insertionTime value.

getMessageId

public String getMessageId()

Get the messageId property: The Id of the Message.

Returns:

the messageId value.

getMessageText

@Deprecated
public String getMessageText()

Deprecated

use getBody() instead.

Get the messageText property: The content of the Message.

Returns:

the messageText value.

getPopReceipt

public String 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.

getTimeNextVisible

public OffsetDateTime getTimeNextVisible()

Get the timeNextVisible property: The time that the message will again become visible in the Queue.

Returns:

the timeNextVisible value.

setBody

public QueueMessageItem setBody(BinaryData body)

Set the body property: The content of the Message.

Parameters:

body - the body value to set.

Returns:

the QueueMessageItem object itself.

setDequeueCount

public QueueMessageItem setDequeueCount(long dequeueCount)

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.

setExpirationTime

public QueueMessageItem setExpirationTime(OffsetDateTime expirationTime)

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.

setInsertionTime

public QueueMessageItem setInsertionTime(OffsetDateTime insertionTime)

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.

setMessageId

public QueueMessageItem setMessageId(String messageId)

Set the messageId property: The Id of the Message.

Parameters:

messageId - the messageId value to set.

Returns:

the QueueMessageItem object itself.

setMessageText

@Deprecated
public QueueMessageItem setMessageText(String messageText)

Deprecated

Set the messageText property: The content of the Message.

Parameters:

messageText - the messageText value to set.

Returns:

the QueueMessageItem object itself.

setPopReceipt

public QueueMessageItem setPopReceipt(String popReceipt)

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.

setTimeNextVisible

public QueueMessageItem setTimeNextVisible(OffsetDateTime timeNextVisible)

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.

toXml

public XmlWriter toXml(XmlWriter xmlWriter)

Parameters:

xmlWriter

Throws:

toXml

public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)

Parameters:

xmlWriter
rootElementName

Throws:

Applies to