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:
  • Constructor Details

    • 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 Details

    • 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 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.
    • 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 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:
      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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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 class AmazonWebServiceRequest
      See Also: