com.amazonaws.services.pinpointemail.AmazonPinpointEmailAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-pinpointemail Show documentation
/*
* Copyright 2018-2023 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.pinpointemail;
import javax.annotation.Generated;
import com.amazonaws.services.pinpointemail.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Pinpoint Email 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 Pinpoint Email Service
*
* Welcome to the Amazon Pinpoint Email API Reference. This guide provides information about the Amazon Pinpoint
* Email API (version 1.0), including supported operations, data types, parameters, and schemas.
*
*
* Amazon Pinpoint is an AWS service that you can use to engage with your
* customers across multiple messaging channels. You can use Amazon Pinpoint to send email, SMS text messages, voice
* messages, and push notifications. The Amazon Pinpoint Email API provides programmatic access to options that are
* unique to the email channel and supplement the options provided by the Amazon Pinpoint API.
*
*
* If you're new to Amazon Pinpoint, you might find it helpful to also review the Amazon Pinpoint Developer Guide.
* The Amazon Pinpoint Developer Guide provides tutorials, code samples, and procedures that demonstrate how to
* use Amazon Pinpoint features programmatically and how to integrate Amazon Pinpoint functionality into mobile apps and
* other types of applications. The guide also provides information about key topics such as Amazon Pinpoint integration
* with other AWS services and the limits that apply to using the service.
*
*
* The Amazon Pinpoint Email API is available in several AWS Regions and it provides an endpoint for each of these
* Regions. For a list of all the Regions and endpoints where the API is currently available, see AWS Service Endpoints in the
* Amazon Web Services General Reference. To learn more about AWS Regions, see Managing AWS Regions in the Amazon Web
* Services General Reference.
*
*
* In each Region, AWS maintains multiple Availability Zones. These Availability Zones are physically isolated from each
* other, but are united by private, low-latency, high-throughput, and highly redundant network connections. These
* Availability Zones enable us to provide very high levels of availability and redundancy, while also minimizing
* latency. To learn more about the number of Availability Zones that are available in each Region, see AWS Global Infrastructure.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonPinpointEmailAsyncClient extends AmazonPinpointEmailClient implements AmazonPinpointEmailAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonPinpointEmailAsyncClientBuilder asyncBuilder() {
return AmazonPinpointEmailAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Pinpoint Email using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonPinpointEmailAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Pinpoint Email using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonPinpointEmailAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {
super(asyncClientParams, endpointDiscoveryEnabled);
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 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 createDedicatedIpPoolAsync(CreateDedicatedIpPoolRequest request) {
return createDedicatedIpPoolAsync(request, null);
}
@Override
public java.util.concurrent.Future createDedicatedIpPoolAsync(final CreateDedicatedIpPoolRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDedicatedIpPoolRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDedicatedIpPoolResult call() throws Exception {
CreateDedicatedIpPoolResult result = null;
try {
result = executeCreateDedicatedIpPool(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 createDeliverabilityTestReportAsync(CreateDeliverabilityTestReportRequest request) {
return createDeliverabilityTestReportAsync(request, null);
}
@Override
public java.util.concurrent.Future createDeliverabilityTestReportAsync(
final CreateDeliverabilityTestReportRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDeliverabilityTestReportRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDeliverabilityTestReportResult call() throws Exception {
CreateDeliverabilityTestReportResult result = null;
try {
result = executeCreateDeliverabilityTestReport(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 createEmailIdentityAsync(CreateEmailIdentityRequest request) {
return createEmailIdentityAsync(request, null);
}
@Override
public java.util.concurrent.Future createEmailIdentityAsync(final CreateEmailIdentityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateEmailIdentityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateEmailIdentityResult call() throws Exception {
CreateEmailIdentityResult result = null;
try {
result = executeCreateEmailIdentity(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 deleteDedicatedIpPoolAsync(DeleteDedicatedIpPoolRequest request) {
return deleteDedicatedIpPoolAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDedicatedIpPoolAsync(final DeleteDedicatedIpPoolRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDedicatedIpPoolRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDedicatedIpPoolResult call() throws Exception {
DeleteDedicatedIpPoolResult result = null;
try {
result = executeDeleteDedicatedIpPool(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 deleteEmailIdentityAsync(DeleteEmailIdentityRequest request) {
return deleteEmailIdentityAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteEmailIdentityAsync(final DeleteEmailIdentityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteEmailIdentityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteEmailIdentityResult call() throws Exception {
DeleteEmailIdentityResult result = null;
try {
result = executeDeleteEmailIdentity(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 getAccountAsync(GetAccountRequest request) {
return getAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future getAccountAsync(final GetAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAccountResult call() throws Exception {
GetAccountResult result = null;
try {
result = executeGetAccount(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 getBlacklistReportsAsync(GetBlacklistReportsRequest request) {
return getBlacklistReportsAsync(request, null);
}
@Override
public java.util.concurrent.Future getBlacklistReportsAsync(final GetBlacklistReportsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetBlacklistReportsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetBlacklistReportsResult call() throws Exception {
GetBlacklistReportsResult result = null;
try {
result = executeGetBlacklistReports(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 getConfigurationSetAsync(GetConfigurationSetRequest request) {
return getConfigurationSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getConfigurationSetAsync(final GetConfigurationSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConfigurationSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConfigurationSetResult call() throws Exception {
GetConfigurationSetResult result = null;
try {
result = executeGetConfigurationSet(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 getConfigurationSetEventDestinationsAsync(
GetConfigurationSetEventDestinationsRequest request) {
return getConfigurationSetEventDestinationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getConfigurationSetEventDestinationsAsync(
final GetConfigurationSetEventDestinationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConfigurationSetEventDestinationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConfigurationSetEventDestinationsResult call() throws Exception {
GetConfigurationSetEventDestinationsResult result = null;
try {
result = executeGetConfigurationSetEventDestinations(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 getDedicatedIpAsync(GetDedicatedIpRequest request) {
return getDedicatedIpAsync(request, null);
}
@Override
public java.util.concurrent.Future getDedicatedIpAsync(final GetDedicatedIpRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDedicatedIpRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDedicatedIpResult call() throws Exception {
GetDedicatedIpResult result = null;
try {
result = executeGetDedicatedIp(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 getDedicatedIpsAsync(GetDedicatedIpsRequest request) {
return getDedicatedIpsAsync(request, null);
}
@Override
public java.util.concurrent.Future getDedicatedIpsAsync(final GetDedicatedIpsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDedicatedIpsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDedicatedIpsResult call() throws Exception {
GetDedicatedIpsResult result = null;
try {
result = executeGetDedicatedIps(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 getDeliverabilityDashboardOptionsAsync(
GetDeliverabilityDashboardOptionsRequest request) {
return getDeliverabilityDashboardOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future getDeliverabilityDashboardOptionsAsync(
final GetDeliverabilityDashboardOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDeliverabilityDashboardOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDeliverabilityDashboardOptionsResult call() throws Exception {
GetDeliverabilityDashboardOptionsResult result = null;
try {
result = executeGetDeliverabilityDashboardOptions(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 getDeliverabilityTestReportAsync(GetDeliverabilityTestReportRequest request) {
return getDeliverabilityTestReportAsync(request, null);
}
@Override
public java.util.concurrent.Future getDeliverabilityTestReportAsync(final GetDeliverabilityTestReportRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDeliverabilityTestReportRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDeliverabilityTestReportResult call() throws Exception {
GetDeliverabilityTestReportResult result = null;
try {
result = executeGetDeliverabilityTestReport(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 getDomainDeliverabilityCampaignAsync(
GetDomainDeliverabilityCampaignRequest request) {
return getDomainDeliverabilityCampaignAsync(request, null);
}
@Override
public java.util.concurrent.Future getDomainDeliverabilityCampaignAsync(
final GetDomainDeliverabilityCampaignRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDomainDeliverabilityCampaignRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDomainDeliverabilityCampaignResult call() throws Exception {
GetDomainDeliverabilityCampaignResult result = null;
try {
result = executeGetDomainDeliverabilityCampaign(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 getDomainStatisticsReportAsync(GetDomainStatisticsReportRequest request) {
return getDomainStatisticsReportAsync(request, null);
}
@Override
public java.util.concurrent.Future getDomainStatisticsReportAsync(final GetDomainStatisticsReportRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDomainStatisticsReportRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDomainStatisticsReportResult call() throws Exception {
GetDomainStatisticsReportResult result = null;
try {
result = executeGetDomainStatisticsReport(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 getEmailIdentityAsync(GetEmailIdentityRequest request) {
return getEmailIdentityAsync(request, null);
}
@Override
public java.util.concurrent.Future getEmailIdentityAsync(final GetEmailIdentityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetEmailIdentityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetEmailIdentityResult call() throws Exception {
GetEmailIdentityResult result = null;
try {
result = executeGetEmailIdentity(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 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 listDedicatedIpPoolsAsync(ListDedicatedIpPoolsRequest request) {
return listDedicatedIpPoolsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDedicatedIpPoolsAsync(final ListDedicatedIpPoolsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDedicatedIpPoolsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDedicatedIpPoolsResult call() throws Exception {
ListDedicatedIpPoolsResult result = null;
try {
result = executeListDedicatedIpPools(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 listDeliverabilityTestReportsAsync(ListDeliverabilityTestReportsRequest request) {
return listDeliverabilityTestReportsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDeliverabilityTestReportsAsync(
final ListDeliverabilityTestReportsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDeliverabilityTestReportsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDeliverabilityTestReportsResult call() throws Exception {
ListDeliverabilityTestReportsResult result = null;
try {
result = executeListDeliverabilityTestReports(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 listDomainDeliverabilityCampaignsAsync(
ListDomainDeliverabilityCampaignsRequest request) {
return listDomainDeliverabilityCampaignsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDomainDeliverabilityCampaignsAsync(
final ListDomainDeliverabilityCampaignsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDomainDeliverabilityCampaignsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDomainDeliverabilityCampaignsResult call() throws Exception {
ListDomainDeliverabilityCampaignsResult result = null;
try {
result = executeListDomainDeliverabilityCampaigns(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 listEmailIdentitiesAsync(ListEmailIdentitiesRequest request) {
return listEmailIdentitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future listEmailIdentitiesAsync(final ListEmailIdentitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEmailIdentitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEmailIdentitiesResult call() throws Exception {
ListEmailIdentitiesResult result = null;
try {
result = executeListEmailIdentities(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 listTagsForResourceAsync(ListTagsForResourceRequest request) {
return listTagsForResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTagsForResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTagsForResourceResult call() throws Exception {
ListTagsForResourceResult result = null;
try {
result = executeListTagsForResource(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 putAccountDedicatedIpWarmupAttributesAsync(
PutAccountDedicatedIpWarmupAttributesRequest request) {
return putAccountDedicatedIpWarmupAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future putAccountDedicatedIpWarmupAttributesAsync(
final PutAccountDedicatedIpWarmupAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutAccountDedicatedIpWarmupAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutAccountDedicatedIpWarmupAttributesResult call() throws Exception {
PutAccountDedicatedIpWarmupAttributesResult result = null;
try {
result = executePutAccountDedicatedIpWarmupAttributes(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 putAccountSendingAttributesAsync(PutAccountSendingAttributesRequest request) {
return putAccountSendingAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future putAccountSendingAttributesAsync(final PutAccountSendingAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutAccountSendingAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutAccountSendingAttributesResult call() throws Exception {
PutAccountSendingAttributesResult result = null;
try {
result = executePutAccountSendingAttributes(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 putConfigurationSetDeliveryOptionsAsync(
PutConfigurationSetDeliveryOptionsRequest request) {
return putConfigurationSetDeliveryOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future putConfigurationSetDeliveryOptionsAsync(
final PutConfigurationSetDeliveryOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutConfigurationSetDeliveryOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutConfigurationSetDeliveryOptionsResult call() throws Exception {
PutConfigurationSetDeliveryOptionsResult result = null;
try {
result = executePutConfigurationSetDeliveryOptions(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 putConfigurationSetReputationOptionsAsync(
PutConfigurationSetReputationOptionsRequest request) {
return putConfigurationSetReputationOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future putConfigurationSetReputationOptionsAsync(
final PutConfigurationSetReputationOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutConfigurationSetReputationOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutConfigurationSetReputationOptionsResult call() throws Exception {
PutConfigurationSetReputationOptionsResult result = null;
try {
result = executePutConfigurationSetReputationOptions(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 putConfigurationSetSendingOptionsAsync(
PutConfigurationSetSendingOptionsRequest request) {
return putConfigurationSetSendingOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future putConfigurationSetSendingOptionsAsync(
final PutConfigurationSetSendingOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutConfigurationSetSendingOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutConfigurationSetSendingOptionsResult call() throws Exception {
PutConfigurationSetSendingOptionsResult result = null;
try {
result = executePutConfigurationSetSendingOptions(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 putConfigurationSetTrackingOptionsAsync(
PutConfigurationSetTrackingOptionsRequest request) {
return putConfigurationSetTrackingOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future putConfigurationSetTrackingOptionsAsync(
final PutConfigurationSetTrackingOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutConfigurationSetTrackingOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutConfigurationSetTrackingOptionsResult call() throws Exception {
PutConfigurationSetTrackingOptionsResult result = null;
try {
result = executePutConfigurationSetTrackingOptions(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 putDedicatedIpInPoolAsync(PutDedicatedIpInPoolRequest request) {
return putDedicatedIpInPoolAsync(request, null);
}
@Override
public java.util.concurrent.Future putDedicatedIpInPoolAsync(final PutDedicatedIpInPoolRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutDedicatedIpInPoolRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutDedicatedIpInPoolResult call() throws Exception {
PutDedicatedIpInPoolResult result = null;
try {
result = executePutDedicatedIpInPool(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 putDedicatedIpWarmupAttributesAsync(PutDedicatedIpWarmupAttributesRequest request) {
return putDedicatedIpWarmupAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future putDedicatedIpWarmupAttributesAsync(
final PutDedicatedIpWarmupAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutDedicatedIpWarmupAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutDedicatedIpWarmupAttributesResult call() throws Exception {
PutDedicatedIpWarmupAttributesResult result = null;
try {
result = executePutDedicatedIpWarmupAttributes(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 putDeliverabilityDashboardOptionAsync(
PutDeliverabilityDashboardOptionRequest request) {
return putDeliverabilityDashboardOptionAsync(request, null);
}
@Override
public java.util.concurrent.Future putDeliverabilityDashboardOptionAsync(
final PutDeliverabilityDashboardOptionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutDeliverabilityDashboardOptionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutDeliverabilityDashboardOptionResult call() throws Exception {
PutDeliverabilityDashboardOptionResult result = null;
try {
result = executePutDeliverabilityDashboardOption(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 putEmailIdentityDkimAttributesAsync(PutEmailIdentityDkimAttributesRequest request) {
return putEmailIdentityDkimAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future putEmailIdentityDkimAttributesAsync(
final PutEmailIdentityDkimAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutEmailIdentityDkimAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutEmailIdentityDkimAttributesResult call() throws Exception {
PutEmailIdentityDkimAttributesResult result = null;
try {
result = executePutEmailIdentityDkimAttributes(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 putEmailIdentityFeedbackAttributesAsync(
PutEmailIdentityFeedbackAttributesRequest request) {
return putEmailIdentityFeedbackAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future putEmailIdentityFeedbackAttributesAsync(
final PutEmailIdentityFeedbackAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutEmailIdentityFeedbackAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutEmailIdentityFeedbackAttributesResult call() throws Exception {
PutEmailIdentityFeedbackAttributesResult result = null;
try {
result = executePutEmailIdentityFeedbackAttributes(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 putEmailIdentityMailFromAttributesAsync(
PutEmailIdentityMailFromAttributesRequest request) {
return putEmailIdentityMailFromAttributesAsync(request, null);
}
@Override
public java.util.concurrent.Future putEmailIdentityMailFromAttributesAsync(
final PutEmailIdentityMailFromAttributesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutEmailIdentityMailFromAttributesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutEmailIdentityMailFromAttributesResult call() throws Exception {
PutEmailIdentityMailFromAttributesResult result = null;
try {
result = executePutEmailIdentityMailFromAttributes(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 tagResourceAsync(TagResourceRequest request) {
return tagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TagResourceResult call() throws Exception {
TagResourceResult result = null;
try {
result = executeTagResource(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 untagResourceAsync(UntagResourceRequest request) {
return untagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UntagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UntagResourceResult call() throws Exception {
UntagResourceResult result = null;
try {
result = executeUntagResource(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;
}
});
}
/**
* 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();
}
}