com.amazonaws.services.sqs.model
Class SendMessageRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.sqs.model.SendMessageRequest

public class SendMessageRequest
extends AmazonWebServiceRequest

Container for the parameters to the SendMessage operation.

The SendMessage action delivers a message to the specified queue.

See Also:
AmazonSQS.sendMessage(SendMessageRequest)

Constructor Summary
SendMessageRequest()
          Default constructor for a new SendMessageRequest object.
SendMessageRequest(String queueUrl, String messageBody)
          Constructs a new SendMessageRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 Integer getDelaySeconds()
          The number of seconds the message has to be delayed.
 String getMessageBody()
          The message to send.
 String getQueueUrl()
          The URL of the SQS queue to take action on.
 int hashCode()
           
 void setDelaySeconds(Integer delaySeconds)
          The number of seconds the message has to be delayed.
 void setMessageBody(String messageBody)
          The message to send.
 void setQueueUrl(String queueUrl)
          The URL of the 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 the message has to be delayed.
 SendMessageRequest withMessageBody(String messageBody)
          The message to send.
 SendMessageRequest withQueueUrl(String queueUrl)
          The URL of the SQS queue to take action on.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SendMessageRequest

public SendMessageRequest()
Default constructor for a new SendMessageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this 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 SQS queue to take action on.
messageBody - The message to send.
Method Detail

getQueueUrl

public String getQueueUrl()
The URL of the SQS queue to take action on.

Returns:
The URL of the SQS queue to take action on.

setQueueUrl

public void setQueueUrl(String queueUrl)
The URL of the SQS queue to take action on.

Parameters:
queueUrl - The URL of the SQS queue to take action on.

withQueueUrl

public SendMessageRequest withQueueUrl(String queueUrl)
The URL of the SQS queue to take action on.

Returns a reference to this object so that method calls can be chained together.

Parameters:
queueUrl - The URL of the SQS queue to take action on.
Returns:
A reference to this updated object so that method calls can be chained together.

getMessageBody

public String getMessageBody()
The message to send.

Returns:
The message to send.

setMessageBody

public void setMessageBody(String messageBody)
The message to send.

Parameters:
messageBody - The message to send.

withMessageBody

public SendMessageRequest withMessageBody(String messageBody)
The message to send.

Returns a reference to this object so that method calls can be chained together.

Parameters:
messageBody - The message to send.
Returns:
A reference to this updated object so that method calls can be chained together.

getDelaySeconds

public Integer getDelaySeconds()
The number of seconds the message has to be delayed.

Returns:
The number of seconds the message has to be delayed.

setDelaySeconds

public void setDelaySeconds(Integer delaySeconds)
The number of seconds the message has to be delayed.

Parameters:
delaySeconds - The number of seconds the message has to be delayed.

withDelaySeconds

public SendMessageRequest withDelaySeconds(Integer delaySeconds)
The number of seconds the message has to be delayed.

Returns a reference to this object so that method calls can be chained together.

Parameters:
delaySeconds - The number of seconds the message has to be delayed.
Returns:
A reference to this updated 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 class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.