public class SendMessageRequest extends AmazonWebServiceRequest implements Serializable
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]
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 |
---|---|
boolean |
equals(Object obj) |
Integer |
getDelaySeconds()
The number of seconds (0 to 900 - 15 minutes) to delay a specific
message.
|
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 |
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 |
withMessageBody(String messageBody)
The message to send.
|
SendMessageRequest |
withQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, 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 String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.