|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceClient
com.amazonaws.services.sqs.AmazonSQSClient
public class AmazonSQSClient
Client for accessing AmazonSQS. All service calls made using this client are blocking, and will not return until the service call completes.
Constructor Summary | |
---|---|
AmazonSQSClient()
Constructs a new client to invoke service methods on AmazonSQS. |
|
AmazonSQSClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on AmazonSQS using the specified AWS account credentials. |
|
AmazonSQSClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AmazonSQS using the specified AWS account credentials and client configuration options. |
|
AmazonSQSClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on AmazonSQS using the specified AWS account credentials provider. |
|
AmazonSQSClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AmazonSQS using the specified AWS account credentials provider and client configuration options. |
|
AmazonSQSClient(ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AmazonSQS. |
Method Summary | |
---|---|
void |
addPermission(AddPermissionRequest addPermissionRequest)
|
void |
changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest)
|
ChangeMessageVisibilityBatchResult |
changeMessageVisibilityBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest)
|
CreateQueueResult |
createQueue(CreateQueueRequest createQueueRequest)
|
void |
deleteMessage(DeleteMessageRequest deleteMessageRequest)
|
DeleteMessageBatchResult |
deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest)
|
void |
deleteQueue(DeleteQueueRequest deleteQueueRequest)
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful, request, typically used for debugging issues where a service isn't acting as expected. |
GetQueueAttributesResult |
getQueueAttributes(GetQueueAttributesRequest getQueueAttributesRequest)
|
GetQueueUrlResult |
getQueueUrl(GetQueueUrlRequest getQueueUrlRequest)
|
ListQueuesResult |
listQueues()
|
ListQueuesResult |
listQueues(ListQueuesRequest listQueuesRequest)
|
ReceiveMessageResult |
receiveMessage(ReceiveMessageRequest receiveMessageRequest)
|
void |
removePermission(RemovePermissionRequest removePermissionRequest)
|
SendMessageResult |
sendMessage(SendMessageRequest sendMessageRequest)
|
SendMessageBatchResult |
sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest)
|
void |
setEndpoint(java.lang.String endpoint,
java.lang.String serviceName,
java.lang.String regionId)
Overrides the default endpoint for this client ("sqs.us-east-1.amazonaws.com") and explicitly provides an AWS region ID and AWS service name to use when the client calculates a signature for requests. |
void |
setQueueAttributes(SetQueueAttributesRequest setQueueAttributesRequest)
|
Methods inherited from class com.amazonaws.AmazonWebServiceClient |
---|
addRequestHandler, getTimeOffset, removeRequestHandler, setConfiguration, setEndpoint, setRegion, setTimeOffset, shutdown, withTimeOffset |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.amazonaws.services.sqs.AmazonSQS |
---|
setEndpoint, setRegion, shutdown |
Constructor Detail |
---|
public AmazonSQSClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProvider
public AmazonSQSClient(ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this
client connects to AmazonSQS
(ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProvider
public AmazonSQSClient(AWSCredentials awsCredentials)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use
when authenticating with AWS services.public AmazonSQSClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use
when authenticating with AWS services.clientConfiguration
- The client configuration options controlling how this
client connects to AmazonSQS
(ex: proxy settings, retry counts, etc.).public AmazonSQSClient(AWSCredentialsProvider awsCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.public AmazonSQSClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this
client connects to AmazonSQS
(ex: proxy settings, retry counts, etc.).Method Detail |
---|
public void setQueueAttributes(SetQueueAttributesRequest setQueueAttributesRequest) throws AmazonServiceException, AmazonClientException
setQueueAttributes
in interface AmazonSQS
setQueueAttributesRequest
- Container for the necessary
parameters to execute the SetQueueAttributes service method on
AmazonSQS.
InvalidAttributeNameException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws AmazonServiceException, AmazonClientException
changeMessageVisibilityBatch
in interface AmazonSQS
changeMessageVisibilityBatchRequest
- Container for the necessary
parameters to execute the ChangeMessageVisibilityBatch service method
on AmazonSQS.
BatchEntryIdsNotDistinctException
TooManyEntriesInBatchRequestException
InvalidBatchEntryIdException
EmptyBatchRequestException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public void changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws AmazonServiceException, AmazonClientException
changeMessageVisibility
in interface AmazonSQS
changeMessageVisibilityRequest
- Container for the necessary
parameters to execute the ChangeMessageVisibility service method on
AmazonSQS.
ReceiptHandleIsInvalidException
MessageNotInflightException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public GetQueueUrlResult getQueueUrl(GetQueueUrlRequest getQueueUrlRequest) throws AmazonServiceException, AmazonClientException
getQueueUrl
in interface AmazonSQS
getQueueUrlRequest
- Container for the necessary parameters to
execute the GetQueueUrl service method on AmazonSQS.
QueueDoesNotExistException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public void removePermission(RemovePermissionRequest removePermissionRequest) throws AmazonServiceException, AmazonClientException
removePermission
in interface AmazonSQS
removePermissionRequest
- Container for the necessary parameters
to execute the RemovePermission service method on AmazonSQS.
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public GetQueueAttributesResult getQueueAttributes(GetQueueAttributesRequest getQueueAttributesRequest) throws AmazonServiceException, AmazonClientException
getQueueAttributes
in interface AmazonSQS
getQueueAttributesRequest
- Container for the necessary
parameters to execute the GetQueueAttributes service method on
AmazonSQS.
InvalidAttributeNameException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public SendMessageBatchResult sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws AmazonServiceException, AmazonClientException
sendMessageBatch
in interface AmazonSQS
sendMessageBatchRequest
- Container for the necessary parameters
to execute the SendMessageBatch service method on AmazonSQS.
BatchEntryIdsNotDistinctException
TooManyEntriesInBatchRequestException
BatchRequestTooLongException
InvalidBatchEntryIdException
EmptyBatchRequestException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public void deleteQueue(DeleteQueueRequest deleteQueueRequest) throws AmazonServiceException, AmazonClientException
deleteQueue
in interface AmazonSQS
deleteQueueRequest
- Container for the necessary parameters to
execute the DeleteQueue service method on AmazonSQS.
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public SendMessageResult sendMessage(SendMessageRequest sendMessageRequest) throws AmazonServiceException, AmazonClientException
sendMessage
in interface AmazonSQS
sendMessageRequest
- Container for the necessary parameters to
execute the SendMessage service method on AmazonSQS.
InvalidMessageContentsException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public ReceiveMessageResult receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws AmazonServiceException, AmazonClientException
receiveMessage
in interface AmazonSQS
receiveMessageRequest
- Container for the necessary parameters to
execute the ReceiveMessage service method on AmazonSQS.
OverLimitException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public ListQueuesResult listQueues(ListQueuesRequest listQueuesRequest) throws AmazonServiceException, AmazonClientException
listQueues
in interface AmazonSQS
listQueuesRequest
- Container for the necessary parameters to
execute the ListQueues service method on AmazonSQS.
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public DeleteMessageBatchResult deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws AmazonServiceException, AmazonClientException
deleteMessageBatch
in interface AmazonSQS
deleteMessageBatchRequest
- Container for the necessary
parameters to execute the DeleteMessageBatch service method on
AmazonSQS.
BatchEntryIdsNotDistinctException
TooManyEntriesInBatchRequestException
InvalidBatchEntryIdException
EmptyBatchRequestException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public CreateQueueResult createQueue(CreateQueueRequest createQueueRequest) throws AmazonServiceException, AmazonClientException
createQueue
in interface AmazonSQS
createQueueRequest
- Container for the necessary parameters to
execute the CreateQueue service method on AmazonSQS.
QueueNameExistsException
QueueDeletedRecentlyException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public void addPermission(AddPermissionRequest addPermissionRequest) throws AmazonServiceException, AmazonClientException
addPermission
in interface AmazonSQS
addPermissionRequest
- Container for the necessary parameters to
execute the AddPermission service method on AmazonSQS.
OverLimitException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws AmazonServiceException, AmazonClientException
deleteMessage
in interface AmazonSQS
deleteMessageRequest
- Container for the necessary parameters to
execute the DeleteMessage service method on AmazonSQS.
ReceiptHandleIsInvalidException
InvalidIdFormatException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public ListQueuesResult listQueues() throws AmazonServiceException, AmazonClientException
listQueues
in interface AmazonSQS
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSQS indicating
either a problem with the data in the request, or a server side issue.public void setEndpoint(java.lang.String endpoint, java.lang.String serviceName, java.lang.String regionId) throws java.lang.IllegalArgumentException
This method is not threadsafe. Endpoints should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit.
Callers can pass in just the endpoint (ex: "sqs.us-east-1.amazonaws.com") or a full
URL, including the protocol (ex: "sqs.us-east-1.amazonaws.com"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
endpoint
- The endpoint (ex: "sqs.us-east-1.amazonaws.com") or a full URL,
including the protocol (ex: "sqs.us-east-1.amazonaws.com") of
the region specific AWS endpoint this client will communicate
with.serviceName
- The name of the AWS service to use when signing requests.regionId
- The ID of the region in which this service resides.
java.lang.IllegalArgumentException
- If any problems are detected with the specified endpoint.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AmazonSQS
request
- The originally executed request
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |