|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.sqs.model.Message
public class Message
An Amazon SQS message.
Constructor Summary | |
---|---|
Message()
Default constructor for a new Message object. |
Method Summary | |
---|---|
Message |
addAttributesEntry(java.lang.String key,
java.lang.String value)
SenderId , SentTimestamp ,
ApproximateReceiveCount , and/or
ApproximateFirstReceiveTimestamp . |
Message |
addMessageAttributesEntry(java.lang.String key,
MessageAttributeValue value)
Each message attribute consists of a Name, Type, and Value. |
Message |
clearAttributesEntries()
Removes all the entries added into Attributes. |
Message |
clearMessageAttributesEntries()
Removes all the entries added into MessageAttributes. |
boolean |
equals(java.lang.Object obj)
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
SenderId , SentTimestamp ,
ApproximateReceiveCount , and/or
ApproximateFirstReceiveTimestamp . |
java.lang.String |
getBody()
The message's contents (not URL-encoded). |
java.lang.String |
getMD5OfBody()
An MD5 digest of the non-URL-encoded message body string. |
java.lang.String |
getMD5OfMessageAttributes()
An MD5 digest of the non-URL-encoded message attribute string. |
java.util.Map<java.lang.String,MessageAttributeValue> |
getMessageAttributes()
Each message attribute consists of a Name, Type, and Value. |
java.lang.String |
getMessageId()
A unique identifier for the message. |
java.lang.String |
getReceiptHandle()
An identifier associated with the act of receiving the message. |
int |
hashCode()
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
SenderId , SentTimestamp ,
ApproximateReceiveCount , and/or
ApproximateFirstReceiveTimestamp . |
void |
setBody(java.lang.String body)
The message's contents (not URL-encoded). |
void |
setMD5OfBody(java.lang.String mD5OfBody)
An MD5 digest of the non-URL-encoded message body string. |
void |
setMD5OfMessageAttributes(java.lang.String mD5OfMessageAttributes)
An MD5 digest of the non-URL-encoded message attribute string. |
void |
setMessageAttributes(java.util.Map<java.lang.String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value. |
void |
setMessageId(java.lang.String messageId)
A unique identifier for the message. |
void |
setReceiptHandle(java.lang.String receiptHandle)
An identifier associated with the act of receiving the message. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
Message |
withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
SenderId , SentTimestamp ,
ApproximateReceiveCount , and/or
ApproximateFirstReceiveTimestamp . |
Message |
withBody(java.lang.String body)
The message's contents (not URL-encoded). |
Message |
withMD5OfBody(java.lang.String mD5OfBody)
An MD5 digest of the non-URL-encoded message body string. |
Message |
withMD5OfMessageAttributes(java.lang.String mD5OfMessageAttributes)
An MD5 digest of the non-URL-encoded message attribute string. |
Message |
withMessageAttributes(java.util.Map<java.lang.String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value. |
Message |
withMessageId(java.lang.String messageId)
A unique identifier for the message. |
Message |
withReceiptHandle(java.lang.String receiptHandle)
An identifier associated with the act of receiving the message. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Message()
Method Detail |
---|
public java.lang.String getMessageId()
public void setMessageId(java.lang.String messageId)
messageId
- A unique identifier for the message. Message IDs are considered unique
across all AWS accounts for an extended period of time.public Message withMessageId(java.lang.String messageId)
Returns a reference to this object so that method calls can be chained together.
messageId
- A unique identifier for the message. Message IDs are considered unique
across all AWS accounts for an extended period of time.
public java.lang.String getReceiptHandle()
public void setReceiptHandle(java.lang.String receiptHandle)
receiptHandle
- An identifier associated with the act of receiving the message. A new
receipt handle is returned every time you receive a message. When
deleting a message, you provide the last received receipt handle to
delete the message.public Message withReceiptHandle(java.lang.String receiptHandle)
Returns a reference to this object so that method calls can be chained together.
receiptHandle
- An identifier associated with the act of receiving the message. A new
receipt handle is returned every time you receive a message. When
deleting a message, you provide the last received receipt handle to
delete the message.
public java.lang.String getMD5OfBody()
public void setMD5OfBody(java.lang.String mD5OfBody)
mD5OfBody
- An MD5 digest of the non-URL-encoded message body string.public Message withMD5OfBody(java.lang.String mD5OfBody)
Returns a reference to this object so that method calls can be chained together.
mD5OfBody
- An MD5 digest of the non-URL-encoded message body string.
public java.lang.String getBody()
public void setBody(java.lang.String body)
body
- The message's contents (not URL-encoded).public Message withBody(java.lang.String body)
Returns a reference to this object so that method calls can be chained together.
body
- The message's contents (not URL-encoded).
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.
SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.
attributes
- SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.public Message withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.
Returns a reference to this object so that method calls can be chained together.
attributes
- SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.
public Message addAttributesEntry(java.lang.String key, java.lang.String value)
SenderId
, SentTimestamp
,
ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
.
SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an
integer representing the epoch time in
milliseconds.
The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Attributes.value
- The corresponding value of the entry to be added into Attributes.public Message clearAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String getMD5OfMessageAttributes()
public void setMD5OfMessageAttributes(java.lang.String mD5OfMessageAttributes)
mD5OfMessageAttributes
- An MD5 digest of the non-URL-encoded message attribute string. This
can be used to verify that Amazon SQS received the message correctly.
Amazon SQS first URL decodes the message before creating the MD5
digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.public Message withMD5OfMessageAttributes(java.lang.String mD5OfMessageAttributes)
Returns a reference to this object so that method calls can be chained together.
mD5OfMessageAttributes
- An MD5 digest of the non-URL-encoded message attribute string. This
can be used to verify that Amazon SQS received the message correctly.
Amazon SQS first URL decodes the message before creating the MD5
digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
public java.util.Map<java.lang.String,MessageAttributeValue> getMessageAttributes()
public void setMessageAttributes(java.util.Map<java.lang.String,MessageAttributeValue> messageAttributes)
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more
information, see Message
Attribute Items.public Message withMessageAttributes(java.util.Map<java.lang.String,MessageAttributeValue> messageAttributes)
Returns a reference to this object so that method calls can be chained together.
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more
information, see Message
Attribute Items.
public Message addMessageAttributesEntry(java.lang.String key, MessageAttributeValue value)
The method adds a new key-value pair into MessageAttributes parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into MessageAttributes.value
- The corresponding value of the entry to be added into MessageAttributes.public Message clearMessageAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |