Packagecom.amazonaws.services.sqs.model
Classpublic class ChangeMessageVisibilityRequest
InheritanceChangeMessageVisibilityRequest Inheritance AmazonWebServiceRequest Inheritance Object

Language Version : ActionScript 3.0
Product Version : Flex 4
Since : February 2. 2011
Runtime Versions : Flash Player 10.1, AIR 2.5

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.



Public Methods
 MethodDefined By
  
ChangeMessageVisibilityRequest(queueUrl:String = null, receiptHandle:String = null, visibilityTimeout:Number)
Constructs a new ChangeMessageVisibilityRequest object.
ChangeMessageVisibilityRequest
  
getQueueUrl():String
The queue URL.
ChangeMessageVisibilityRequest
  
The receipt handle associated with the message whose visibility timeout you want to change.
ChangeMessageVisibilityRequest
  
The value for the message's visibility timeout (in seconds).
ChangeMessageVisibilityRequest
  
setQueueUrl(queueUrl:String):void
Expected queue URL format: (http|https://endpoint/12digitOwnerAccountId/QueueName).
ChangeMessageVisibilityRequest
  
setReceiptHandle(receiptHandle:String):void
The receipt handle associated with the message whose visibility timeout you want to change.
ChangeMessageVisibilityRequest
  
setVisibilityTimeout(visibilityTimeout:Number):void
The new value for the message's visibility timeout (in seconds).
ChangeMessageVisibilityRequest
  
toString():String
Returns a string representation of this object; useful for testing and debugging.
ChangeMessageVisibilityRequest
  
Expected query URL format: (http|https://endpoint/12digitOwnerAccountId/QueueName).
ChangeMessageVisibilityRequest
  
The receipt handle associated with the message whose visibility timeout you want to change.
ChangeMessageVisibilityRequest
  
The new value for the message's visibility timeout (in seconds).
ChangeMessageVisibilityRequest
Constructor Detail
ChangeMessageVisibilityRequest()Constructor
public function ChangeMessageVisibilityRequest(queueUrl:String = null, receiptHandle:String = null, visibilityTimeout:Number)

Constructs a new ChangeMessageVisibilityRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters
queueUrl:String (default = null) — queue URL (http|https://endpoint/12digitOwnerAccountId/QueueName)
 
receiptHandle:String (default = null) — The receipt handle associated with the message whose visibility timeout the client wants to change.
 
visibilityTimeout:Number (default = NaN) — The new value (in seconds) for the message's visibility timeout.
Method Detail
getQueueUrl()method
public function getQueueUrl():String

The queue URL. (http|https://endpoint/12digitOwnerAccountId/QueueName).

Returns
String — queue URL
getReceiptHandle()method 
public function getReceiptHandle():String

The receipt handle associated with the message whose visibility timeout you want to change. This parameter is returned by the ReceiveMessage action.

Returns
String — The receipt handle associated with the message whose visibility timeout you want to change.
getVisibilityTimeout()method 
public function getVisibilityTimeout():Number

The value for the message's visibility timeout (in seconds).

Returns
Number — The value for the message's visibility timeout (in seconds).
setQueueUrl()method 
public function setQueueUrl(queueUrl:String):void

Expected queue URL format: (http|https://endpoint/12digitOwnerAccountId/QueueName).

Parameters

queueUrl:String — query URL

setReceiptHandle()method 
public function setReceiptHandle(receiptHandle:String):void

The receipt handle associated with the message whose visibility timeout you want to change. This parameter is returned by the ReceiveMessage action.

Parameters

receiptHandle:String — The receipt handle associated with the message whose visibility timeout you want to change

setVisibilityTimeout()method 
public function setVisibilityTimeout(visibilityTimeout:Number):void

The new value for the message's visibility timeout (in seconds).

Parameters

visibilityTimeout:Number — The new value for the message's visibility timeout (in seconds).

toString()method 
public function toString():String

Returns a string representation of this object; useful for testing and debugging.

Returns
String — A string representation of this object.
withQueueUrl()method 
public function withQueueUrl(queueUrl:String):ChangeMessageVisibilityRequest

Expected query URL format: (http|https://endpoint/12digitOwnerAccountId/QueueName).

Parameters

queueUrl:String — queue URL

Returns
ChangeMessageVisibilityRequest — A reference to this updated object so that method calls can be chained together.
withReceiptHandle()method 
public function withReceiptHandle(receiptHandle:String):ChangeMessageVisibilityRequest

The receipt handle associated with the message whose visibility timeout you want to change. This parameter is returned by the ReceiveMessage action.

Parameters

receiptHandle:String — The receipt handle associated with the message whose visibility timeout you want to change

Returns
ChangeMessageVisibilityRequest — A reference to this updated object so that method calls can be chained together.
withVisibilityTimeout()method 
public function withVisibilityTimeout(visibilityTimeout:Number):ChangeMessageVisibilityRequest

The new value for the message's visibility timeout (in seconds).

Parameters

visibilityTimeout:Number — The new value for the message's visibility timeout (in seconds).

Returns
ChangeMessageVisibilityRequest — A reference to this updated object so that method calls can be chained together.