public class SendMessageBatchRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
SendMessageBatch operation
.
Delivers up to ten messages to the specified queue. This is a batch version of SendMessage. The result of the send action on each message is reported individually in the response. The maximum allowed individual message size is 256 KB (262,144 bytes).
The maximum total payload size (i.e., the sum of all a batch's individual message lengths) is also 256 KB (262,144 bytes).
If the DelaySeconds
parameter is not specified for an
entry, the default for the queue is used.
IMPORTANT:The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification. For more information, go to http://www.faqs.org/rfcs/rfc1321.html. If you send any characters that are not included in the list, your request will be rejected. #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]
IMPORTANT: Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
NOTE:Some API actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:
&Attribute.1=this
&Attribute.2=that
NOOP
Constructor and Description |
---|
SendMessageBatchRequest()
Default constructor for a new SendMessageBatchRequest object.
|
SendMessageBatchRequest(String queueUrl)
Constructs a new SendMessageBatchRequest object.
|
SendMessageBatchRequest(String queueUrl,
List<SendMessageBatchRequestEntry> entries)
Constructs a new SendMessageBatchRequest object.
|
Modifier and Type | Method and Description |
---|---|
SendMessageBatchRequest |
clone() |
boolean |
equals(Object obj) |
List<SendMessageBatchRequestEntry> |
getEntries()
A list of SendMessageBatchRequestEntry items.
|
String |
getQueueUrl()
The URL of the Amazon SQS queue to take action on.
|
int |
hashCode() |
void |
setEntries(Collection<SendMessageBatchRequestEntry> entries)
A list of SendMessageBatchRequestEntry items.
|
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.
|
SendMessageBatchRequest |
withEntries(Collection<SendMessageBatchRequestEntry> entries)
A list of SendMessageBatchRequestEntry items.
|
SendMessageBatchRequest |
withEntries(SendMessageBatchRequestEntry... entries)
A list of SendMessageBatchRequestEntry items.
|
SendMessageBatchRequest |
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 SendMessageBatchRequest()
public SendMessageBatchRequest(String queueUrl)
queueUrl
- The URL of the Amazon SQS queue to take action on.public SendMessageBatchRequest(String queueUrl, List<SendMessageBatchRequestEntry> entries)
queueUrl
- The URL of the Amazon SQS queue to take action on.entries
- A list of SendMessageBatchRequestEntry items.public String getQueueUrl()
public void setQueueUrl(String queueUrl)
queueUrl
- The URL of the Amazon SQS queue to take action on.public SendMessageBatchRequest 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 List<SendMessageBatchRequestEntry> getEntries()
public void setEntries(Collection<SendMessageBatchRequestEntry> entries)
entries
- A list of SendMessageBatchRequestEntry items.public SendMessageBatchRequest withEntries(SendMessageBatchRequestEntry... entries)
NOTE: This method appends the values to the existing list (if
any). Use setEntries(java.util.Collection)
or withEntries(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
entries
- A list of SendMessageBatchRequestEntry items.public SendMessageBatchRequest withEntries(Collection<SendMessageBatchRequestEntry> entries)
Returns a reference to this object so that method calls can be chained together.
entries
- A list of SendMessageBatchRequestEntry items.public String toString()
toString
in class Object
Object.toString()
public SendMessageBatchRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2015. All rights reserved.