|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.sqs.model.ChangeMessageVisibilityRequest
public class ChangeMessageVisibilityRequest
Container for the parameters to the ChangeMessageVisibility operation
.
The ChangeMessageVisibility
action changes the visibility timeout of a specified message in a queue to a new value. The maximum allowed
timeout value you can set the value to is 12 hours. This means you can't extend the timeout of a message in an existing queue to more than a total
visibility timeout of 12 hours. (For more information visibility timeout, see Visibility Timeout in the Amazon SQS
Developer Guide.)
For example, let's say you have a message and its default message visibility timeout is 30 minutes. You could call ChangeMessageVisiblity
with a value of two hours and the effective timeout would be two hours and 30 minutes. When that time comes near you could again extend the time out
by calling ChangeMessageVisiblity, but this time the maximum allowed timeout would be 9 hours and 30 minutes.
IMPORTANT:If you attempt to set the VisibilityTimeout to an amount more than the maximum time left, Amazon SQS returns an error. It will not automatically recalculate and increase the timeout to the maximum time remaining.
IMPORTANT:Unlike with a queue, when you change the visibility timeout for a specific message, that timeout value is applied immediately but is not saved in memory for that message. If you don't delete a message after it is received, the visibility timeout for the message the next time it is received reverts to the original timeout value, not the value you set with the ChangeMessageVisibility action.
AmazonSQS.changeMessageVisibility(ChangeMessageVisibilityRequest)
Constructor Summary | |
---|---|
ChangeMessageVisibilityRequest()
Default constructor for a new ChangeMessageVisibilityRequest object. |
|
ChangeMessageVisibilityRequest(String queueUrl,
String receiptHandle,
Integer visibilityTimeout)
Constructs a new ChangeMessageVisibilityRequest object. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getQueueUrl()
The URL of the SQS queue to take action on. |
String |
getReceiptHandle()
The receipt handle associated with the message whose visibility timeout should be changed. |
Integer |
getVisibilityTimeout()
The new value (in seconds) for the message's visibility timeout. |
int |
hashCode()
|
void |
setQueueUrl(String queueUrl)
The URL of the SQS queue to take action on. |
void |
setReceiptHandle(String receiptHandle)
The receipt handle associated with the message whose visibility timeout should be changed. |
void |
setVisibilityTimeout(Integer visibilityTimeout)
The new value (in seconds) for the message's visibility timeout. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
ChangeMessageVisibilityRequest |
withQueueUrl(String queueUrl)
The URL of the SQS queue to take action on. |
ChangeMessageVisibilityRequest |
withReceiptHandle(String receiptHandle)
The receipt handle associated with the message whose visibility timeout should be changed. |
ChangeMessageVisibilityRequest |
withVisibilityTimeout(Integer visibilityTimeout)
The new value (in seconds) for the message's visibility timeout. |
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 |
---|
public ChangeMessageVisibilityRequest()
public ChangeMessageVisibilityRequest(String queueUrl, String receiptHandle, Integer visibilityTimeout)
queueUrl
- The URL of the SQS queue to take action on.receiptHandle
- The receipt handle associated with the message
whose visibility timeout should be changed.visibilityTimeout
- The new value (in seconds) for the message's
visibility timeout.Method Detail |
---|
public String getQueueUrl()
public void setQueueUrl(String queueUrl)
queueUrl
- The URL of the SQS queue to take action on.public ChangeMessageVisibilityRequest withQueueUrl(String queueUrl)
Returns a reference to this object so that method calls can be chained together.
queueUrl
- The URL of the SQS queue to take action on.
public String getReceiptHandle()
public void setReceiptHandle(String receiptHandle)
receiptHandle
- The receipt handle associated with the message whose visibility
timeout should be changed.public ChangeMessageVisibilityRequest withReceiptHandle(String receiptHandle)
Returns a reference to this object so that method calls can be chained together.
receiptHandle
- The receipt handle associated with the message whose visibility
timeout should be changed.
public Integer getVisibilityTimeout()
public void setVisibilityTimeout(Integer visibilityTimeout)
visibilityTimeout
- The new value (in seconds) for the message's visibility timeout.public ChangeMessageVisibilityRequest withVisibilityTimeout(Integer visibilityTimeout)
Returns a reference to this object so that method calls can be chained together.
visibilityTimeout
- The new value (in seconds) for the message's visibility timeout.
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |