com.amazonaws.services.simpleemail
Class AmazonSimpleEmailServiceAsyncClient

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceClient
      extended by com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient
          extended by com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceAsyncClient
All Implemented Interfaces:
AmazonSimpleEmailService, AmazonSimpleEmailServiceAsync

public class AmazonSimpleEmailServiceAsyncClient
extends AmazonSimpleEmailServiceClient
implements AmazonSimpleEmailServiceAsync

Client for accessing AmazonSimpleEmailService. All calls made using this client are non-blocking and will immediately return a Java Future. Callers must use the Future object to determine when the service call has actually completed. Amazon Simple Email Service

This is the API Reference for Amazon Simple Email Service (Amazon SES). This documentation is intended to be used in conjunction with the Amazon SES Getting Started Guide and the Amazon SES Developer Guide.

For specific details on how to construct a service request, please consult the Amazon SES Developer Guide .


Constructor Summary
AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials)
          Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials.
AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
          Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials, executor service, and client configuration options.
AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
          Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials and executor service.
AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
          Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials provider.
AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
          Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials provider, executor service, and client configuration options.
AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
          Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials provider and executor service.
 
Method Summary
 Future<Void> deleteVerifiedEmailAddressAsync(DeleteVerifiedEmailAddressRequest deleteVerifiedEmailAddressRequest)
           Deletes the specified email address from the list of verified addresses.
 ExecutorService getExecutorService()
          Returns the executor service used by this async client to execute requests.
 Future<GetSendQuotaResult> getSendQuotaAsync(GetSendQuotaRequest getSendQuotaRequest)
           Returns the user's current activity limits.
 Future<GetSendStatisticsResult> getSendStatisticsAsync(GetSendStatisticsRequest getSendStatisticsRequest)
           Returns the user's sending statistics.
 Future<ListVerifiedEmailAddressesResult> listVerifiedEmailAddressesAsync(ListVerifiedEmailAddressesRequest listVerifiedEmailAddressesRequest)
           Returns a list containing all of the email addresses that have been verified.
 Future<SendEmailResult> sendEmailAsync(SendEmailRequest sendEmailRequest)
           Composes an email message based on input data, and then immediately queues the message for sending.
 Future<SendRawEmailResult> sendRawEmailAsync(SendRawEmailRequest sendRawEmailRequest)
           Sends an email message, with header and content specified by the client.
 void shutdown()
          Shuts down the client, releasing all managed resources.
 Future<Void> verifyEmailAddressAsync(VerifyEmailAddressRequest verifyEmailAddressRequest)
           Verifies an email address.
 
Methods inherited from class com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient
deleteVerifiedEmailAddress, getCachedResponseMetadata, getSendQuota, getSendQuota, getSendStatistics, getSendStatistics, listVerifiedEmailAddresses, listVerifiedEmailAddresses, sendEmail, sendRawEmail, verifyEmailAddress
 
Methods inherited from class com.amazonaws.AmazonWebServiceClient
addRequestHandler, removeRequestHandler, setConfiguration, setEndpoint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.amazonaws.services.simpleemail.AmazonSimpleEmailService
deleteVerifiedEmailAddress, getCachedResponseMetadata, getSendQuota, getSendQuota, getSendStatistics, getSendStatistics, listVerifiedEmailAddresses, listVerifiedEmailAddresses, sendEmail, sendRawEmail, setEndpoint, verifyEmailAddress
 

Constructor Detail

AmazonSimpleEmailServiceAsyncClient

public AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials. Default client settings will be used, and a default cached thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.

AmazonSimpleEmailServiceAsyncClient

public AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials,
                                           ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
executorService - The executor service by which all asynchronous requests will be executed.

AmazonSimpleEmailServiceAsyncClient

public AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials,
                                           ClientConfiguration clientConfiguration,
                                           ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
clientConfiguration - Client configuration options (ex: max retry limit, proxy settings, etc).
executorService - The executor service by which all asynchronous requests will be executed.

AmazonSimpleEmailServiceAsyncClient

public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials provider. Default client settings will be used, and a default cached thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.

AmazonSimpleEmailServiceAsyncClient

public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                                           ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials provider and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
executorService - The executor service by which all asynchronous requests will be executed.

AmazonSimpleEmailServiceAsyncClient

public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                                           ClientConfiguration clientConfiguration,
                                           ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AmazonSimpleEmailService using the specified AWS account credentials provider, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration - Client configuration options (ex: max retry limit, proxy settings, etc).
executorService - The executor service by which all asynchronous requests will be executed.
Method Detail

getExecutorService

public ExecutorService getExecutorService()
Returns the executor service used by this async client to execute requests.

Returns:
The executor service used by this async client to execute requests.

shutdown

public void shutdown()
Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should call getExecutorService().shutdown() prior to calling this method.

Specified by:
shutdown in interface AmazonSimpleEmailService
Overrides:
shutdown in class AmazonWebServiceClient

getSendQuotaAsync

public Future<GetSendQuotaResult> getSendQuotaAsync(GetSendQuotaRequest getSendQuotaRequest)
                                             throws AmazonServiceException,
                                                    AmazonClientException

Returns the user's current activity limits.

Specified by:
getSendQuotaAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
getSendQuotaRequest - Container for the necessary parameters to execute the GetSendQuota operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the GetSendQuota service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.

listVerifiedEmailAddressesAsync

public Future<ListVerifiedEmailAddressesResult> listVerifiedEmailAddressesAsync(ListVerifiedEmailAddressesRequest listVerifiedEmailAddressesRequest)
                                                                         throws AmazonServiceException,
                                                                                AmazonClientException

Returns a list containing all of the email addresses that have been verified.

Specified by:
listVerifiedEmailAddressesAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
listVerifiedEmailAddressesRequest - Container for the necessary parameters to execute the ListVerifiedEmailAddresses operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the ListVerifiedEmailAddresses service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.

getSendStatisticsAsync

public Future<GetSendStatisticsResult> getSendStatisticsAsync(GetSendStatisticsRequest getSendStatisticsRequest)
                                                       throws AmazonServiceException,
                                                              AmazonClientException

Returns the user's sending statistics. The result is a list of data points, representing the last two weeks of sending activity.

Each data point in the list contains statistics for a 15-minute interval.

Specified by:
getSendStatisticsAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
getSendStatisticsRequest - Container for the necessary parameters to execute the GetSendStatistics operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the GetSendStatistics service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.

sendEmailAsync

public Future<SendEmailResult> sendEmailAsync(SendEmailRequest sendEmailRequest)
                                       throws AmazonServiceException,
                                              AmazonClientException

Composes an email message based on input data, and then immediately queues the message for sending.

IMPORTANT:If you have not yet requested production access to Amazon SES, then you will only be able to send email to and from verified email addresses. For more information, go to the Amazon SES Developer Guide.

Specified by:
sendEmailAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
sendEmailRequest - Container for the necessary parameters to execute the SendEmail operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the SendEmail service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.

deleteVerifiedEmailAddressAsync

public Future<Void> deleteVerifiedEmailAddressAsync(DeleteVerifiedEmailAddressRequest deleteVerifiedEmailAddressRequest)
                                             throws AmazonServiceException,
                                                    AmazonClientException

Deletes the specified email address from the list of verified addresses.

Specified by:
deleteVerifiedEmailAddressAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
deleteVerifiedEmailAddressRequest - Container for the necessary parameters to execute the DeleteVerifiedEmailAddress operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the DeleteVerifiedEmailAddress service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.

verifyEmailAddressAsync

public Future<Void> verifyEmailAddressAsync(VerifyEmailAddressRequest verifyEmailAddressRequest)
                                     throws AmazonServiceException,
                                            AmazonClientException

Verifies an email address. This action causes a confirmation email message to be sent to the specified address.

Specified by:
verifyEmailAddressAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
verifyEmailAddressRequest - Container for the necessary parameters to execute the VerifyEmailAddress operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the VerifyEmailAddress service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.

sendRawEmailAsync

public Future<SendRawEmailResult> sendRawEmailAsync(SendRawEmailRequest sendRawEmailRequest)
                                             throws AmazonServiceException,
                                                    AmazonClientException

Sends an email message, with header and content specified by the client. The SendRawEmail action is useful for sending multipart MIME emails, with attachments or inline content. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent.

IMPORTANT:If you have not yet requested production access to Amazon SES, then you will only be able to send email to and from verified email addresses. For more information, go to the Amazon SES Developer Guide.

Specified by:
sendRawEmailAsync in interface AmazonSimpleEmailServiceAsync
Parameters:
sendRawEmailRequest - Container for the necessary parameters to execute the SendRawEmail operation on AmazonSimpleEmailService.
Returns:
A Java Future object containing the response from the SendRawEmail service method, as returned by AmazonSimpleEmailService.
Throws:
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 AmazonSimpleEmailService indicating either a problem with the data in the request, or a server side issue.


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