public class SendMessageRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
SendMessage operation
.
Delivers a message to the specified queue. With Amazon SQS, you now have the ability to send large payload messages that are up to 256KB (262,144 bytes) in size. To send large payloads, you must use an AWS SDK that supports SigV4 signing. To verify whether SigV4 is supported for an AWS SDK, check the SDK release notes.
IMPORTANT: The following list shows the characters (in Unicode) allowed in your message, according to the W3C XML specification. For more information, go to http://www.w3.org/TR/REC-xml/#charsets If you send any characters not included in the list, your request will be rejected. #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]
NOOP
Constructor and Description |
---|
SendMessageRequest()
Default constructor for a new SendMessageRequest object.
|
SendMessageRequest(String queueUrl,
String messageBody)
Constructs a new SendMessageRequest object.
|
Modifier and Type | Method and Description |
---|---|
SendMessageRequest |
addMessageAttributesEntry(String key,
MessageAttributeValue value)
Each message attribute consists of a Name, Type, and Value.
|
SendMessageRequest |
clearMessageAttributesEntries()
Removes all the entries added into MessageAttributes.
|
SendMessageRequest |
clone() |
boolean |
equals(Object obj) |
Integer |
getDelaySeconds()
The number of seconds (0 to 900 - 15 minutes) to delay a specific
message.
|
Map<String,MessageAttributeValue> |
getMessageAttributes()
Each message attribute consists of a Name, Type, and Value.
|
String |
getMessageBody()
The message to send.
|
String |
getQueueUrl()
The URL of the Amazon SQS queue to take action on.
|
int |
hashCode() |
void |
setDelaySeconds(Integer delaySeconds)
The number of seconds (0 to 900 - 15 minutes) to delay a specific
message.
|
void |
setMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value.
|
void |
setMessageBody(String messageBody)
The message to send.
|
void |
setQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SendMessageRequest |
withDelaySeconds(Integer delaySeconds)
The number of seconds (0 to 900 - 15 minutes) to delay a specific
message.
|
SendMessageRequest |
withMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value.
|
SendMessageRequest |
withMessageBody(String messageBody)
The message to send.
|
SendMessageRequest |
withQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public SendMessageRequest()
public SendMessageRequest(String queueUrl, String messageBody)
queueUrl
- The URL of the Amazon SQS queue to take action on.messageBody
- The message to send. String maximum 256 KB in size.
For a list of allowed characters, see the preceding important note.public String getQueueUrl()
public void setQueueUrl(String queueUrl)
queueUrl
- The URL of the Amazon SQS queue to take action on.public SendMessageRequest withQueueUrl(String queueUrl)
Returns a reference to this object so that method calls can be chained together.
queueUrl
- The URL of the Amazon SQS queue to take action on.public String getMessageBody()
public void setMessageBody(String messageBody)
messageBody
- The message to send. String maximum 256 KB in size. For a list of
allowed characters, see the preceding important note.public SendMessageRequest withMessageBody(String messageBody)
Returns a reference to this object so that method calls can be chained together.
messageBody
- The message to send. String maximum 256 KB in size. For a list of
allowed characters, see the preceding important note.public Integer getDelaySeconds()
DelaySeconds
value
become available for processing after the delay time is finished. If
you don't specify a value, the default value for the queue applies.DelaySeconds
value
become available for processing after the delay time is finished. If
you don't specify a value, the default value for the queue applies.public void setDelaySeconds(Integer delaySeconds)
DelaySeconds
value
become available for processing after the delay time is finished. If
you don't specify a value, the default value for the queue applies.delaySeconds
- The number of seconds (0 to 900 - 15 minutes) to delay a specific
message. Messages with a positive DelaySeconds
value
become available for processing after the delay time is finished. If
you don't specify a value, the default value for the queue applies.public SendMessageRequest withDelaySeconds(Integer delaySeconds)
DelaySeconds
value
become available for processing after the delay time is finished. If
you don't specify a value, the default value for the queue applies.
Returns a reference to this object so that method calls can be chained together.
delaySeconds
- The number of seconds (0 to 900 - 15 minutes) to delay a specific
message. Messages with a positive DelaySeconds
value
become available for processing after the delay time is finished. If
you don't specify a value, the default value for the queue applies.public Map<String,MessageAttributeValue> getMessageAttributes()
public void setMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more
information, see Message
Attribute Items.public SendMessageRequest withMessageAttributes(Map<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 SendMessageRequest addMessageAttributesEntry(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 SendMessageRequest clearMessageAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString
in class Object
Object.toString()
public SendMessageRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2015. All rights reserved.