Class SendMessageRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.sqs.model.SendMessageRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
public class SendMessageRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description SendMessageRequest()
Default constructor for SendMessageRequest object.SendMessageRequest(String queueUrl, String messageBody)
Constructs a new SendMessageRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SendMessageRequest
addMessageAttributesEntry(String key, MessageAttributeValue value)
SendMessageRequest
clearMessageAttributesEntries()
Removes all the entries added into MessageAttributes.SendMessageRequest
clone()
Creates a shallow clone of this request.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.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
SendMessageRequest
public SendMessageRequest()
Default constructor for SendMessageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
SendMessageRequest
public SendMessageRequest(String queueUrl, String messageBody)
Constructs a new SendMessageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
queueUrl
- The URL of the Amazon SQS queue to take action on.Queue URLs are case-sensitive.
messageBody
- The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.
-
-
Method Detail
-
setQueueUrl
public void setQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
- Parameters:
queueUrl
- The URL of the Amazon SQS queue to take action on.Queue URLs are case-sensitive.
-
getQueueUrl
public String getQueueUrl()
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
- Returns:
- The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
-
withQueueUrl
public SendMessageRequest withQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
- Parameters:
queueUrl
- The URL of the Amazon SQS queue to take action on.Queue URLs are case-sensitive.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMessageBody
public void setMessageBody(String messageBody)
The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.
- Parameters:
messageBody
- The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.
-
getMessageBody
public String getMessageBody()
The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.
- Returns:
- The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.
-
withMessageBody
public SendMessageRequest withMessageBody(String messageBody)
The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.
- Parameters:
messageBody
- The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDelaySeconds
public void setDelaySeconds(Integer 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.- Parameters:
delaySeconds
- The number of seconds (0 to 900 - 15 minutes) to delay a specific message. Messages with a positiveDelaySeconds
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.
-
getDelaySeconds
public Integer getDelaySeconds()
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.- Returns:
- 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.
-
withDelaySeconds
public SendMessageRequest withDelaySeconds(Integer 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.- Parameters:
delaySeconds
- The number of seconds (0 to 900 - 15 minutes) to delay a specific message. Messages with a positiveDelaySeconds
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:
- Returns a reference to this object so that method calls can be chained together.
-
getMessageAttributes
public Map<String,MessageAttributeValue> getMessageAttributes()
Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.
- Returns:
- Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.
-
setMessageAttributes
public void setMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.
- Parameters:
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.
-
withMessageAttributes
public SendMessageRequest withMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.
- Parameters:
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addMessageAttributesEntry
public SendMessageRequest addMessageAttributesEntry(String key, MessageAttributeValue value)
-
clearMessageAttributesEntries
public SendMessageRequest clearMessageAttributesEntries()
Removes all the entries added into MessageAttributes. <p> Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public SendMessageRequest clone()
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
Object.clone()
-
-