com.amazonaws.services.sqs.model
Class CreateQueueRequest

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

public class CreateQueueRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateQueue operation.

The CreateQueue action creates a new queue, or returns the URL of an existing one. When you request CreateQueue, you provide a name for the queue. To successfully create a new queue, you must provide a name that is unique within the scope of your own queues. If you provide the name of an existing queue, a new queue isn't created and an error isn't returned. Instead, the request succeeds and the queue URL for the existing queue is returned.

IMPORTANT: If you provide a value for DefaultVisibilityTimeout that is different from the value for the existing queue, you receive an error.

See Also:
AmazonSQS.createQueue(CreateQueueRequest)

Constructor Summary
CreateQueueRequest()
          Default constructor for a new CreateQueueRequest object.
CreateQueueRequest(String queueName)
          Constructs a new CreateQueueRequest object.
CreateQueueRequest(String queueName, Integer defaultVisibilityTimeout)
          Constructs a new CreateQueueRequest object.
 
Method Summary
 Integer getDefaultVisibilityTimeout()
          The visibility timeout (in seconds) to use for the created queue.
 String getQueueName()
          The name to use for the created queue.
 void setDefaultVisibilityTimeout(Integer defaultVisibilityTimeout)
          The visibility timeout (in seconds) to use for the created queue.
 void setQueueName(String queueName)
          The name to use for the created queue.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateQueueRequest withDefaultVisibilityTimeout(Integer defaultVisibilityTimeout)
          The visibility timeout (in seconds) to use for the created queue.
 CreateQueueRequest withQueueName(String queueName)
          The name to use for the created queue.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateQueueRequest

public CreateQueueRequest()
Default constructor for a new CreateQueueRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


CreateQueueRequest

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

Parameters:
queueName - The name to use for the created queue.

CreateQueueRequest

public CreateQueueRequest(String queueName,
                          Integer defaultVisibilityTimeout)
Constructs a new CreateQueueRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
queueName - The name to use for the created queue.
defaultVisibilityTimeout - The visibility timeout (in seconds) to use for the created queue.
Method Detail

getQueueName

public String getQueueName()
The name to use for the created queue.

Returns:
The name to use for the created queue.

setQueueName

public void setQueueName(String queueName)
The name to use for the created queue.

Parameters:
queueName - The name to use for the created queue.

withQueueName

public CreateQueueRequest withQueueName(String queueName)
The name to use for the created queue.

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

Parameters:
queueName - The name to use for the created queue.
Returns:
A reference to this updated object so that method calls can be chained together.

getDefaultVisibilityTimeout

public Integer getDefaultVisibilityTimeout()
The visibility timeout (in seconds) to use for the created queue.

Returns:
The visibility timeout (in seconds) to use for the created queue.

setDefaultVisibilityTimeout

public void setDefaultVisibilityTimeout(Integer defaultVisibilityTimeout)
The visibility timeout (in seconds) to use for the created queue.

Parameters:
defaultVisibilityTimeout - The visibility timeout (in seconds) to use for the created queue.

withDefaultVisibilityTimeout

public CreateQueueRequest withDefaultVisibilityTimeout(Integer defaultVisibilityTimeout)
The visibility timeout (in seconds) to use for the created queue.

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

Parameters:
defaultVisibilityTimeout - The visibility timeout (in seconds) to use for the created queue.
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()


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