com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ses Show documentation
/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.simpleemail;
import static java.util.concurrent.Executors.newFixedThreadPool;
import javax.annotation.Generated;
import com.amazonaws.services.simpleemail.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
/**
* Client for accessing Amazon SES asynchronously. Each asynchronous method will return a Java Future object
* representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
* notification when an asynchronous operation completes.
*
* 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 Developer
* Guide.
*
*
*
* For a list of Amazon SES endpoints to use in service requests, see Regions and Amazon SES in the Amazon SES
* Developer Guide.
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonSimpleEmailServiceAsyncClient extends AmazonSimpleEmailServiceClient implements AmazonSimpleEmailServiceAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES. A credentials provider chain will
* be used that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
* maximum number of concurrent connections to the service).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#defaultClient()}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient() {
this(DefaultAWSCredentialsProviderChain.getInstance());
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES. A credentials provider chain will
* be used that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
* maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}.
*
* @param clientConfiguration
* The client configuration options controlling how this client connects to Amazon SES (ex: proxy settings,
* retry counts, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified AWS account
* credentials.
*
* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
* maximum number of concurrent connections to the service).
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified AWS account
* credentials and executor service. Default client settings will be used.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
this(awsCredentials, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified AWS account
* credentials, executor service, and client configuration options.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy settings, etc).
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified AWS account
* credentials provider. Default client settings will be used.
*
* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
* maximum number of concurrent connections to the service).
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the provided AWS account
* credentials provider and client configuration options.
*
* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
* maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy settings, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified AWS account
* credentials provider and executor service. Default client settings will be used.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified AWS account
* credentials provider, executor service, and client configuration options.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy settings, etc).
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonSimpleEmailServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonSimpleEmailServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonSimpleEmailServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
public static AmazonSimpleEmailServiceAsyncClientBuilder asyncBuilder() {
return AmazonSimpleEmailServiceAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon SES using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonSimpleEmailServiceAsyncClient(AwsAsyncClientParams asyncClientParams) {
super(asyncClientParams);
this.executorService = asyncClientParams.getExecutor();
}
/**
* Returns the executor service used by this client to execute async requests.
*
* @return The executor service used by this client to execute async requests.
*/
public ExecutorService getExecutorService() {
return executorService;
}
@Override
public java.util.concurrent.Future cloneReceiptRuleSetAsync(CloneReceiptRuleSetRequest request) {
return cloneReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future cloneReceiptRuleSetAsync(final CloneReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CloneReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CloneReceiptRuleSetResult call() throws Exception {
CloneReceiptRuleSetResult result = null;
try {
result = executeCloneReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createConfigurationSetAsync(CreateConfigurationSetRequest request) {
return createConfigurationSetAsync(request, null);
}
@Override
public java.util.concurrent.Future createConfigurationSetAsync(final CreateConfigurationSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConfigurationSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConfigurationSetResult call() throws Exception {
CreateConfigurationSetResult result = null;
try {
result = executeCreateConfigurationSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createConfigurationSetEventDestinationAsync(
CreateConfigurationSetEventDestinationRequest request) {
return createConfigurationSetEventDestinationAsync(request, null);
}
@Override
public java.util.concurrent.Future createConfigurationSetEventDestinationAsync(
final CreateConfigurationSetEventDestinationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConfigurationSetEventDestinationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConfigurationSetEventDestinationResult call() throws Exception {
CreateConfigurationSetEventDestinationResult result = null;
try {
result = executeCreateConfigurationSetEventDestination(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createReceiptFilterAsync(CreateReceiptFilterRequest request) {
return createReceiptFilterAsync(request, null);
}
@Override
public java.util.concurrent.Future createReceiptFilterAsync(final CreateReceiptFilterRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateReceiptFilterRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateReceiptFilterResult call() throws Exception {
CreateReceiptFilterResult result = null;
try {
result = executeCreateReceiptFilter(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createReceiptRuleAsync(CreateReceiptRuleRequest request) {
return createReceiptRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future createReceiptRuleAsync(final CreateReceiptRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateReceiptRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateReceiptRuleResult call() throws Exception {
CreateReceiptRuleResult result = null;
try {
result = executeCreateReceiptRule(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createReceiptRuleSetAsync(CreateReceiptRuleSetRequest request) {
return createReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future createReceiptRuleSetAsync(final CreateReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateReceiptRuleSetResult call() throws Exception {
CreateReceiptRuleSetResult result = null;
try {
result = executeCreateReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteConfigurationSetAsync(DeleteConfigurationSetRequest request) {
return deleteConfigurationSetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConfigurationSetAsync(final DeleteConfigurationSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConfigurationSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConfigurationSetResult call() throws Exception {
DeleteConfigurationSetResult result = null;
try {
result = executeDeleteConfigurationSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteConfigurationSetEventDestinationAsync(
DeleteConfigurationSetEventDestinationRequest request) {
return deleteConfigurationSetEventDestinationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConfigurationSetEventDestinationAsync(
final DeleteConfigurationSetEventDestinationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConfigurationSetEventDestinationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConfigurationSetEventDestinationResult call() throws Exception {
DeleteConfigurationSetEventDestinationResult result = null;
try {
result = executeDeleteConfigurationSetEventDestination(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteIdentityAsync(DeleteIdentityRequest request) {
return deleteIdentityAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIdentityAsync(final DeleteIdentityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIdentityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIdentityResult call() throws Exception {
DeleteIdentityResult result = null;
try {
result = executeDeleteIdentity(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteIdentityPolicyAsync(DeleteIdentityPolicyRequest request) {
return deleteIdentityPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIdentityPolicyAsync(final DeleteIdentityPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIdentityPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIdentityPolicyResult call() throws Exception {
DeleteIdentityPolicyResult result = null;
try {
result = executeDeleteIdentityPolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteReceiptFilterAsync(DeleteReceiptFilterRequest request) {
return deleteReceiptFilterAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteReceiptFilterAsync(final DeleteReceiptFilterRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteReceiptFilterRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteReceiptFilterResult call() throws Exception {
DeleteReceiptFilterResult result = null;
try {
result = executeDeleteReceiptFilter(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteReceiptRuleAsync(DeleteReceiptRuleRequest request) {
return deleteReceiptRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteReceiptRuleAsync(final DeleteReceiptRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteReceiptRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteReceiptRuleResult call() throws Exception {
DeleteReceiptRuleResult result = null;
try {
result = executeDeleteReceiptRule(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteReceiptRuleSetAsync(DeleteReceiptRuleSetRequest request) {
return deleteReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteReceiptRuleSetAsync(final DeleteReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteReceiptRuleSetResult call() throws Exception {
DeleteReceiptRuleSetResult result = null;
try {
result = executeDeleteReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteVerifiedEmailAddressAsync(DeleteVerifiedEmailAddressRequest request) {
return deleteVerifiedEmailAddressAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteVerifiedEmailAddressAsync(final DeleteVerifiedEmailAddressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteVerifiedEmailAddressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteVerifiedEmailAddressResult call() throws Exception {
DeleteVerifiedEmailAddressResult result = null;
try {
result = executeDeleteVerifiedEmailAddress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future describeActiveReceiptRuleSetAsync(DescribeActiveReceiptRuleSetRequest request) {
return describeActiveReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future describeActiveReceiptRuleSetAsync(final DescribeActiveReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeActiveReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeActiveReceiptRuleSetResult call() throws Exception {
DescribeActiveReceiptRuleSetResult result = null;
try {
result = executeDescribeActiveReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future describeConfigurationSetAsync(DescribeConfigurationSetRequest request) {
return describeConfigurationSetAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConfigurationSetAsync(final DescribeConfigurationSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConfigurationSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConfigurationSetResult call() throws Exception {
DescribeConfigurationSetResult result = null;
try {
result = executeDescribeConfigurationSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future describeReceiptRuleAsync(DescribeReceiptRuleRequest request) {
return describeReceiptRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future describeReceiptRuleAsync(final DescribeReceiptRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeReceiptRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeReceiptRuleResult call() throws Exception {
DescribeReceiptRuleResult result = null;
try {
result = executeDescribeReceiptRule(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future describeReceiptRuleSetAsync(DescribeReceiptRuleSetRequest request) {
return describeReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future describeReceiptRuleSetAsync(final DescribeReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeReceiptRuleSetResult call() throws Exception {
DescribeReceiptRuleSetResult result = null;
try {
result = executeDescribeReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getIdentityDkimAttributesAsync(GetIdentityDkimAttributesRequest request) {
return getIdentityDkimAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdentityDkimAttributesAsync(final GetIdentityDkimAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdentityDkimAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdentityDkimAttributesResult call() throws Exception {
GetIdentityDkimAttributesResult result = null;
try {
result = executeGetIdentityDkimAttributes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getIdentityMailFromDomainAttributesAsync(
GetIdentityMailFromDomainAttributesRequest request) {
return getIdentityMailFromDomainAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdentityMailFromDomainAttributesAsync(
final GetIdentityMailFromDomainAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdentityMailFromDomainAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdentityMailFromDomainAttributesResult call() throws Exception {
GetIdentityMailFromDomainAttributesResult result = null;
try {
result = executeGetIdentityMailFromDomainAttributes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getIdentityNotificationAttributesAsync(
GetIdentityNotificationAttributesRequest request) {
return getIdentityNotificationAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdentityNotificationAttributesAsync(
final GetIdentityNotificationAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdentityNotificationAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdentityNotificationAttributesResult call() throws Exception {
GetIdentityNotificationAttributesResult result = null;
try {
result = executeGetIdentityNotificationAttributes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getIdentityPoliciesAsync(GetIdentityPoliciesRequest request) {
return getIdentityPoliciesAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdentityPoliciesAsync(final GetIdentityPoliciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdentityPoliciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdentityPoliciesResult call() throws Exception {
GetIdentityPoliciesResult result = null;
try {
result = executeGetIdentityPolicies(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getIdentityVerificationAttributesAsync(
GetIdentityVerificationAttributesRequest request) {
return getIdentityVerificationAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdentityVerificationAttributesAsync(
final GetIdentityVerificationAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdentityVerificationAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdentityVerificationAttributesResult call() throws Exception {
GetIdentityVerificationAttributesResult result = null;
try {
result = executeGetIdentityVerificationAttributes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getSendQuotaAsync(GetSendQuotaRequest request) {
return getSendQuotaAsync(request, null);
}
@Override
public java.util.concurrent.Future getSendQuotaAsync(final GetSendQuotaRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSendQuotaRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSendQuotaResult call() throws Exception {
GetSendQuotaResult result = null;
try {
result = executeGetSendQuota(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the GetSendQuota operation.
*
* @see #getSendQuotaAsync(GetSendQuotaRequest)
*/
@Override
public java.util.concurrent.Future getSendQuotaAsync() {
return getSendQuotaAsync(new GetSendQuotaRequest());
}
/**
* Simplified method form for invoking the GetSendQuota operation with an AsyncHandler.
*
* @see #getSendQuotaAsync(GetSendQuotaRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future getSendQuotaAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return getSendQuotaAsync(new GetSendQuotaRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future getSendStatisticsAsync(GetSendStatisticsRequest request) {
return getSendStatisticsAsync(request, null);
}
@Override
public java.util.concurrent.Future getSendStatisticsAsync(final GetSendStatisticsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSendStatisticsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSendStatisticsResult call() throws Exception {
GetSendStatisticsResult result = null;
try {
result = executeGetSendStatistics(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the GetSendStatistics operation.
*
* @see #getSendStatisticsAsync(GetSendStatisticsRequest)
*/
@Override
public java.util.concurrent.Future getSendStatisticsAsync() {
return getSendStatisticsAsync(new GetSendStatisticsRequest());
}
/**
* Simplified method form for invoking the GetSendStatistics operation with an AsyncHandler.
*
* @see #getSendStatisticsAsync(GetSendStatisticsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future getSendStatisticsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return getSendStatisticsAsync(new GetSendStatisticsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future listConfigurationSetsAsync(ListConfigurationSetsRequest request) {
return listConfigurationSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listConfigurationSetsAsync(final ListConfigurationSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListConfigurationSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListConfigurationSetsResult call() throws Exception {
ListConfigurationSetsResult result = null;
try {
result = executeListConfigurationSets(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listIdentitiesAsync(ListIdentitiesRequest request) {
return listIdentitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future listIdentitiesAsync(final ListIdentitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIdentitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIdentitiesResult call() throws Exception {
ListIdentitiesResult result = null;
try {
result = executeListIdentities(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the ListIdentities operation.
*
* @see #listIdentitiesAsync(ListIdentitiesRequest)
*/
@Override
public java.util.concurrent.Future listIdentitiesAsync() {
return listIdentitiesAsync(new ListIdentitiesRequest());
}
/**
* Simplified method form for invoking the ListIdentities operation with an AsyncHandler.
*
* @see #listIdentitiesAsync(ListIdentitiesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future listIdentitiesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return listIdentitiesAsync(new ListIdentitiesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future listIdentityPoliciesAsync(ListIdentityPoliciesRequest request) {
return listIdentityPoliciesAsync(request, null);
}
@Override
public java.util.concurrent.Future listIdentityPoliciesAsync(final ListIdentityPoliciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIdentityPoliciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIdentityPoliciesResult call() throws Exception {
ListIdentityPoliciesResult result = null;
try {
result = executeListIdentityPolicies(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listReceiptFiltersAsync(ListReceiptFiltersRequest request) {
return listReceiptFiltersAsync(request, null);
}
@Override
public java.util.concurrent.Future listReceiptFiltersAsync(final ListReceiptFiltersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListReceiptFiltersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListReceiptFiltersResult call() throws Exception {
ListReceiptFiltersResult result = null;
try {
result = executeListReceiptFilters(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listReceiptRuleSetsAsync(ListReceiptRuleSetsRequest request) {
return listReceiptRuleSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listReceiptRuleSetsAsync(final ListReceiptRuleSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListReceiptRuleSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListReceiptRuleSetsResult call() throws Exception {
ListReceiptRuleSetsResult result = null;
try {
result = executeListReceiptRuleSets(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listVerifiedEmailAddressesAsync(ListVerifiedEmailAddressesRequest request) {
return listVerifiedEmailAddressesAsync(request, null);
}
@Override
public java.util.concurrent.Future listVerifiedEmailAddressesAsync(final ListVerifiedEmailAddressesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListVerifiedEmailAddressesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListVerifiedEmailAddressesResult call() throws Exception {
ListVerifiedEmailAddressesResult result = null;
try {
result = executeListVerifiedEmailAddresses(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the ListVerifiedEmailAddresses operation.
*
* @see #listVerifiedEmailAddressesAsync(ListVerifiedEmailAddressesRequest)
*/
@Override
public java.util.concurrent.Future listVerifiedEmailAddressesAsync() {
return listVerifiedEmailAddressesAsync(new ListVerifiedEmailAddressesRequest());
}
/**
* Simplified method form for invoking the ListVerifiedEmailAddresses operation with an AsyncHandler.
*
* @see #listVerifiedEmailAddressesAsync(ListVerifiedEmailAddressesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future listVerifiedEmailAddressesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return listVerifiedEmailAddressesAsync(new ListVerifiedEmailAddressesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future putIdentityPolicyAsync(PutIdentityPolicyRequest request) {
return putIdentityPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future putIdentityPolicyAsync(final PutIdentityPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutIdentityPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutIdentityPolicyResult call() throws Exception {
PutIdentityPolicyResult result = null;
try {
result = executePutIdentityPolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future reorderReceiptRuleSetAsync(ReorderReceiptRuleSetRequest request) {
return reorderReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future reorderReceiptRuleSetAsync(final ReorderReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ReorderReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ReorderReceiptRuleSetResult call() throws Exception {
ReorderReceiptRuleSetResult result = null;
try {
result = executeReorderReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future sendBounceAsync(SendBounceRequest request) {
return sendBounceAsync(request, null);
}
@Override
public java.util.concurrent.Future sendBounceAsync(final SendBounceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SendBounceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SendBounceResult call() throws Exception {
SendBounceResult result = null;
try {
result = executeSendBounce(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future sendEmailAsync(SendEmailRequest request) {
return sendEmailAsync(request, null);
}
@Override
public java.util.concurrent.Future sendEmailAsync(final SendEmailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SendEmailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SendEmailResult call() throws Exception {
SendEmailResult result = null;
try {
result = executeSendEmail(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future sendRawEmailAsync(SendRawEmailRequest request) {
return sendRawEmailAsync(request, null);
}
@Override
public java.util.concurrent.Future sendRawEmailAsync(final SendRawEmailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SendRawEmailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SendRawEmailResult call() throws Exception {
SendRawEmailResult result = null;
try {
result = executeSendRawEmail(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setActiveReceiptRuleSetAsync(SetActiveReceiptRuleSetRequest request) {
return setActiveReceiptRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future setActiveReceiptRuleSetAsync(final SetActiveReceiptRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetActiveReceiptRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetActiveReceiptRuleSetResult call() throws Exception {
SetActiveReceiptRuleSetResult result = null;
try {
result = executeSetActiveReceiptRuleSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setIdentityDkimEnabledAsync(SetIdentityDkimEnabledRequest request) {
return setIdentityDkimEnabledAsync(request, null);
}
@Override
public java.util.concurrent.Future setIdentityDkimEnabledAsync(final SetIdentityDkimEnabledRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetIdentityDkimEnabledRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetIdentityDkimEnabledResult call() throws Exception {
SetIdentityDkimEnabledResult result = null;
try {
result = executeSetIdentityDkimEnabled(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setIdentityFeedbackForwardingEnabledAsync(
SetIdentityFeedbackForwardingEnabledRequest request) {
return setIdentityFeedbackForwardingEnabledAsync(request, null);
}
@Override
public java.util.concurrent.Future setIdentityFeedbackForwardingEnabledAsync(
final SetIdentityFeedbackForwardingEnabledRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetIdentityFeedbackForwardingEnabledRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetIdentityFeedbackForwardingEnabledResult call() throws Exception {
SetIdentityFeedbackForwardingEnabledResult result = null;
try {
result = executeSetIdentityFeedbackForwardingEnabled(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setIdentityHeadersInNotificationsEnabledAsync(
SetIdentityHeadersInNotificationsEnabledRequest request) {
return setIdentityHeadersInNotificationsEnabledAsync(request, null);
}
@Override
public java.util.concurrent.Future setIdentityHeadersInNotificationsEnabledAsync(
final SetIdentityHeadersInNotificationsEnabledRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetIdentityHeadersInNotificationsEnabledRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetIdentityHeadersInNotificationsEnabledResult call() throws Exception {
SetIdentityHeadersInNotificationsEnabledResult result = null;
try {
result = executeSetIdentityHeadersInNotificationsEnabled(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setIdentityMailFromDomainAsync(SetIdentityMailFromDomainRequest request) {
return setIdentityMailFromDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future setIdentityMailFromDomainAsync(final SetIdentityMailFromDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetIdentityMailFromDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetIdentityMailFromDomainResult call() throws Exception {
SetIdentityMailFromDomainResult result = null;
try {
result = executeSetIdentityMailFromDomain(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setIdentityNotificationTopicAsync(SetIdentityNotificationTopicRequest request) {
return setIdentityNotificationTopicAsync(request, null);
}
@Override
public java.util.concurrent.Future setIdentityNotificationTopicAsync(final SetIdentityNotificationTopicRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetIdentityNotificationTopicRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetIdentityNotificationTopicResult call() throws Exception {
SetIdentityNotificationTopicResult result = null;
try {
result = executeSetIdentityNotificationTopic(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future setReceiptRulePositionAsync(SetReceiptRulePositionRequest request) {
return setReceiptRulePositionAsync(request, null);
}
@Override
public java.util.concurrent.Future setReceiptRulePositionAsync(final SetReceiptRulePositionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetReceiptRulePositionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetReceiptRulePositionResult call() throws Exception {
SetReceiptRulePositionResult result = null;
try {
result = executeSetReceiptRulePosition(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future updateConfigurationSetEventDestinationAsync(
UpdateConfigurationSetEventDestinationRequest request) {
return updateConfigurationSetEventDestinationAsync(request, null);
}
@Override
public java.util.concurrent.Future updateConfigurationSetEventDestinationAsync(
final UpdateConfigurationSetEventDestinationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateConfigurationSetEventDestinationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateConfigurationSetEventDestinationResult call() throws Exception {
UpdateConfigurationSetEventDestinationResult result = null;
try {
result = executeUpdateConfigurationSetEventDestination(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future updateReceiptRuleAsync(UpdateReceiptRuleRequest request) {
return updateReceiptRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future updateReceiptRuleAsync(final UpdateReceiptRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateReceiptRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateReceiptRuleResult call() throws Exception {
UpdateReceiptRuleResult result = null;
try {
result = executeUpdateReceiptRule(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future verifyDomainDkimAsync(VerifyDomainDkimRequest request) {
return verifyDomainDkimAsync(request, null);
}
@Override
public java.util.concurrent.Future verifyDomainDkimAsync(final VerifyDomainDkimRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final VerifyDomainDkimRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public VerifyDomainDkimResult call() throws Exception {
VerifyDomainDkimResult result = null;
try {
result = executeVerifyDomainDkim(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future verifyDomainIdentityAsync(VerifyDomainIdentityRequest request) {
return verifyDomainIdentityAsync(request, null);
}
@Override
public java.util.concurrent.Future verifyDomainIdentityAsync(final VerifyDomainIdentityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final VerifyDomainIdentityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public VerifyDomainIdentityResult call() throws Exception {
VerifyDomainIdentityResult result = null;
try {
result = executeVerifyDomainIdentity(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future verifyEmailAddressAsync(VerifyEmailAddressRequest request) {
return verifyEmailAddressAsync(request, null);
}
@Override
public java.util.concurrent.Future verifyEmailAddressAsync(final VerifyEmailAddressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final VerifyEmailAddressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public VerifyEmailAddressResult call() throws Exception {
VerifyEmailAddressResult result = null;
try {
result = executeVerifyEmailAddress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future verifyEmailIdentityAsync(VerifyEmailIdentityRequest request) {
return verifyEmailIdentityAsync(request, null);
}
@Override
public java.util.concurrent.Future verifyEmailIdentityAsync(final VerifyEmailIdentityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final VerifyEmailIdentityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public VerifyEmailIdentityResult call() throws Exception {
VerifyEmailIdentityResult result = null;
try {
result = executeVerifyEmailIdentity(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* 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 {@code getExecutorService().shutdown()} followed by {@code getExecutorService().awaitTermination()} prior to
* calling this method.
*/
@Override
public void shutdown() {
super.shutdown();
executorService.shutdownNow();
}
}