public class ReceiveMessageRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
ReceiveMessageRequest()
Default constructor for ReceiveMessageRequest object.
|
ReceiveMessageRequest(String queueUrl)
Constructs a new ReceiveMessageRequest object.
|
Modifier and Type | Method and Description |
---|---|
ReceiveMessageRequest |
clone() |
boolean |
equals(Object obj) |
List<String> |
getAttributeNames()
A list of attributes that need to be returned along with each message.
|
Integer |
getMaxNumberOfMessages()
The maximum number of messages to return.
|
List<String> |
getMessageAttributeNames()
The name of the message attribute, where N is the index.
|
String |
getQueueUrl()
The URL of the Amazon SQS queue to take action on.
|
Integer |
getVisibilityTimeout()
The duration (in seconds) that the received messages are hidden from
subsequent retrieve requests after being retrieved by a
ReceiveMessage request. |
Integer |
getWaitTimeSeconds()
The duration (in seconds) for which the call will wait for a message to
arrive in the queue before returning.
|
int |
hashCode() |
void |
setAttributeNames(Collection<String> attributeNames)
A list of attributes that need to be returned along with each message.
|
void |
setMaxNumberOfMessages(Integer maxNumberOfMessages)
The maximum number of messages to return.
|
void |
setMessageAttributeNames(Collection<String> messageAttributeNames)
The name of the message attribute, where N is the index.
|
void |
setQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
void |
setVisibilityTimeout(Integer visibilityTimeout)
The duration (in seconds) that the received messages are hidden from
subsequent retrieve requests after being retrieved by a
ReceiveMessage request. |
void |
setWaitTimeSeconds(Integer waitTimeSeconds)
The duration (in seconds) for which the call will wait for a message to
arrive in the queue before returning.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ReceiveMessageRequest |
withAttributeNames(Collection<String> attributeNames)
A list of attributes that need to be returned along with each message.
|
ReceiveMessageRequest |
withAttributeNames(QueueAttributeName... attributeNames)
A list of attributes that need to be returned along with each message.
|
ReceiveMessageRequest |
withAttributeNames(String... attributeNames)
A list of attributes that need to be returned along with each message.
|
ReceiveMessageRequest |
withMaxNumberOfMessages(Integer maxNumberOfMessages)
The maximum number of messages to return.
|
ReceiveMessageRequest |
withMessageAttributeNames(Collection<String> messageAttributeNames)
The name of the message attribute, where N is the index.
|
ReceiveMessageRequest |
withMessageAttributeNames(String... messageAttributeNames)
The name of the message attribute, where N is the index.
|
ReceiveMessageRequest |
withQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
ReceiveMessageRequest |
withVisibilityTimeout(Integer visibilityTimeout)
The duration (in seconds) that the received messages are hidden from
subsequent retrieve requests after being retrieved by a
ReceiveMessage request. |
ReceiveMessageRequest |
withWaitTimeSeconds(Integer waitTimeSeconds)
The duration (in seconds) for which the call will wait for a message to
arrive in the queue before returning.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public ReceiveMessageRequest()
public ReceiveMessageRequest(String queueUrl)
queueUrl
- The URL of the Amazon SQS queue to take action on.public void setQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
queueUrl
- The URL of the Amazon SQS queue to take action on.public String getQueueUrl()
The URL of the Amazon SQS queue to take action on.
public ReceiveMessageRequest withQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
queueUrl
- The URL of the Amazon SQS queue to take action on.public List<String> getAttributeNames()
A list of attributes that need to be returned along with each message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the time when
the message was first received from the queue (epoch time in
milliseconds).ApproximateReceiveCount
- returns the number of times a
message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the IP
address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message was
sent to the queue (epoch time in milliseconds).The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the
time when the message was first received from the queue (epoch
time in milliseconds).ApproximateReceiveCount
- returns the number of
times a message has been received from the queue but not deleted.
SenderId
- returns the AWS account number (or
the IP address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the
message was sent to the queue (epoch time in milliseconds).QueueAttributeName
public void setAttributeNames(Collection<String> attributeNames)
A list of attributes that need to be returned along with each message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the time when
the message was first received from the queue (epoch time in
milliseconds).ApproximateReceiveCount
- returns the number of times a
message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the IP
address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message was
sent to the queue (epoch time in milliseconds).attributeNames
- A list of attributes that need to be returned along with each
message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the
time when the message was first received from the queue (epoch
time in milliseconds).ApproximateReceiveCount
- returns the number of
times a message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the
IP address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message
was sent to the queue (epoch time in milliseconds).QueueAttributeName
public ReceiveMessageRequest withAttributeNames(String... attributeNames)
A list of attributes that need to be returned along with each message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the time when
the message was first received from the queue (epoch time in
milliseconds).ApproximateReceiveCount
- returns the number of times a
message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the IP
address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message was
sent to the queue (epoch time in milliseconds).
NOTE: This method appends the values to the existing list (if
any). Use setAttributeNames(java.util.Collection)
or
withAttributeNames(java.util.Collection)
if you want to override
the existing values.
attributeNames
- A list of attributes that need to be returned along with each
message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the
time when the message was first received from the queue (epoch
time in milliseconds).ApproximateReceiveCount
- returns the number of
times a message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the
IP address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message
was sent to the queue (epoch time in milliseconds).QueueAttributeName
public ReceiveMessageRequest withAttributeNames(Collection<String> attributeNames)
A list of attributes that need to be returned along with each message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the time when
the message was first received from the queue (epoch time in
milliseconds).ApproximateReceiveCount
- returns the number of times a
message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the IP
address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message was
sent to the queue (epoch time in milliseconds).attributeNames
- A list of attributes that need to be returned along with each
message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the
time when the message was first received from the queue (epoch
time in milliseconds).ApproximateReceiveCount
- returns the number of
times a message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the
IP address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message
was sent to the queue (epoch time in milliseconds).QueueAttributeName
public ReceiveMessageRequest withAttributeNames(QueueAttributeName... attributeNames)
A list of attributes that need to be returned along with each message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the time when
the message was first received from the queue (epoch time in
milliseconds).ApproximateReceiveCount
- returns the number of times a
message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the IP
address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message was
sent to the queue (epoch time in milliseconds).attributeNames
- A list of attributes that need to be returned along with each
message.
The following lists the names and descriptions of the attributes that can be returned:
All
- returns all values.ApproximateFirstReceiveTimestamp
- returns the
time when the message was first received from the queue (epoch
time in milliseconds).ApproximateReceiveCount
- returns the number of
times a message has been received from the queue but not deleted.SenderId
- returns the AWS account number (or the
IP address, if anonymous access is allowed) of the sender.SentTimestamp
- returns the time when the message
was sent to the queue (epoch time in milliseconds).QueueAttributeName
public List<String> getMessageAttributeNames()
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of attribute
names to receive, or you can return all of the attributes by specifying
"All" or ".*" in your request. You can also use "foo.*" to return all
message attributes starting with the "foo" prefix.
When using ReceiveMessage
, you can send a list of
attribute names to receive, or you can return all of the
attributes by specifying "All" or ".*" in your request. You can
also use "foo.*" to return all message attributes starting with
the "foo" prefix.
public void setMessageAttributeNames(Collection<String> messageAttributeNames)
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of attribute
names to receive, or you can return all of the attributes by specifying
"All" or ".*" in your request. You can also use "foo.*" to return all
message attributes starting with the "foo" prefix.
messageAttributeNames
- The name of the message attribute, where N is the index.
The message attribute name can contain the following characters:
A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The
name must not start or end with a period, and it should not have
successive periods. The name is case sensitive and must be unique
among all attribute names for the message. The name can be up to
256 characters long. The name cannot start with "AWS." or
"Amazon." (or any variations in casing), because these prefixes
are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of
attribute names to receive, or you can return all of the
attributes by specifying "All" or ".*" in your request. You can
also use "foo.*" to return all message attributes starting with
the "foo" prefix.
public ReceiveMessageRequest withMessageAttributeNames(String... messageAttributeNames)
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of attribute
names to receive, or you can return all of the attributes by specifying
"All" or ".*" in your request. You can also use "foo.*" to return all
message attributes starting with the "foo" prefix.
NOTE: This method appends the values to the existing list (if
any). Use setMessageAttributeNames(java.util.Collection)
or
withMessageAttributeNames(java.util.Collection)
if you want to
override the existing values.
messageAttributeNames
- The name of the message attribute, where N is the index.
The message attribute name can contain the following characters:
A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The
name must not start or end with a period, and it should not have
successive periods. The name is case sensitive and must be unique
among all attribute names for the message. The name can be up to
256 characters long. The name cannot start with "AWS." or
"Amazon." (or any variations in casing), because these prefixes
are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of
attribute names to receive, or you can return all of the
attributes by specifying "All" or ".*" in your request. You can
also use "foo.*" to return all message attributes starting with
the "foo" prefix.
public ReceiveMessageRequest withMessageAttributeNames(Collection<String> messageAttributeNames)
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of attribute
names to receive, or you can return all of the attributes by specifying
"All" or ".*" in your request. You can also use "foo.*" to return all
message attributes starting with the "foo" prefix.
messageAttributeNames
- The name of the message attribute, where N is the index.
The message attribute name can contain the following characters:
A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The
name must not start or end with a period, and it should not have
successive periods. The name is case sensitive and must be unique
among all attribute names for the message. The name can be up to
256 characters long. The name cannot start with "AWS." or
"Amazon." (or any variations in casing), because these prefixes
are reserved for use by Amazon Web Services.
When using ReceiveMessage
, you can send a list of
attribute names to receive, or you can return all of the
attributes by specifying "All" or ".*" in your request. You can
also use "foo.*" to return all message attributes starting with
the "foo" prefix.
public void setMaxNumberOfMessages(Integer maxNumberOfMessages)
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.
All of the messages are not necessarily returned.
maxNumberOfMessages
- The maximum number of messages to return. Amazon SQS never returns
more messages than this value but may return fewer. Values can be
from 1 to 10. Default is 1.
All of the messages are not necessarily returned.
public Integer getMaxNumberOfMessages()
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.
All of the messages are not necessarily returned.
All of the messages are not necessarily returned.
public ReceiveMessageRequest withMaxNumberOfMessages(Integer maxNumberOfMessages)
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.
All of the messages are not necessarily returned.
maxNumberOfMessages
- The maximum number of messages to return. Amazon SQS never returns
more messages than this value but may return fewer. Values can be
from 1 to 10. Default is 1.
All of the messages are not necessarily returned.
public void setVisibilityTimeout(Integer visibilityTimeout)
The duration (in seconds) that the received messages are hidden from
subsequent retrieve requests after being retrieved by a
ReceiveMessage
request.
visibilityTimeout
- The duration (in seconds) that the received messages are hidden
from subsequent retrieve requests after being retrieved by a
ReceiveMessage
request.public Integer getVisibilityTimeout()
The duration (in seconds) that the received messages are hidden from
subsequent retrieve requests after being retrieved by a
ReceiveMessage
request.
ReceiveMessage
request.public ReceiveMessageRequest withVisibilityTimeout(Integer visibilityTimeout)
The duration (in seconds) that the received messages are hidden from
subsequent retrieve requests after being retrieved by a
ReceiveMessage
request.
visibilityTimeout
- The duration (in seconds) that the received messages are hidden
from subsequent retrieve requests after being retrieved by a
ReceiveMessage
request.public void setWaitTimeSeconds(Integer waitTimeSeconds)
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
waitTimeSeconds
- The duration (in seconds) for which the call will wait for a
message to arrive in the queue before returning. If a message is
available, the call will return sooner than WaitTimeSeconds.public Integer getWaitTimeSeconds()
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
public ReceiveMessageRequest withWaitTimeSeconds(Integer waitTimeSeconds)
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
waitTimeSeconds
- The duration (in seconds) for which the call will wait for a
message to arrive in the queue before returning. If a message is
available, the call will return sooner than WaitTimeSeconds.public String toString()
toString
in class Object
Object.toString()
public ReceiveMessageRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2016. All rights reserved.