All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.mailmanager.AWSMailManagerAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for MailManager module holds the client classes that are used for communicating with MailManager Service

The newest version!
/*
 * Copyright 2019-2024 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.mailmanager;

import javax.annotation.Generated;

import com.amazonaws.services.mailmanager.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing MailManager 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.
 * 

*

* AWS SES Mail Manager API *

* AWS SES Mail Manager API contains operations and data types that comprise the * Mail Manager feature of Amazon Simple Email Service. *

*

* Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen your organization's email * infrastructure, simplify email workflow management, and streamline email compliance control. To learn more, see the * Mail Manager chapter in the Amazon SES Developer * Guide. *

*

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSMailManagerAsyncClient extends AWSMailManagerClient implements AWSMailManagerAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSMailManagerAsyncClientBuilder asyncBuilder() { return AWSMailManagerAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on MailManager using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSMailManagerAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on MailManager using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSMailManagerAsyncClient(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 createAddonInstanceAsync(CreateAddonInstanceRequest request) { return createAddonInstanceAsync(request, null); } @Override public java.util.concurrent.Future createAddonInstanceAsync(final CreateAddonInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateAddonInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateAddonInstanceResult call() throws Exception { CreateAddonInstanceResult result = null; try { result = executeCreateAddonInstance(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 createAddonSubscriptionAsync(CreateAddonSubscriptionRequest request) { return createAddonSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future createAddonSubscriptionAsync(final CreateAddonSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateAddonSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateAddonSubscriptionResult call() throws Exception { CreateAddonSubscriptionResult result = null; try { result = executeCreateAddonSubscription(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 createArchiveAsync(CreateArchiveRequest request) { return createArchiveAsync(request, null); } @Override public java.util.concurrent.Future createArchiveAsync(final CreateArchiveRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateArchiveRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateArchiveResult call() throws Exception { CreateArchiveResult result = null; try { result = executeCreateArchive(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 createIngressPointAsync(CreateIngressPointRequest request) { return createIngressPointAsync(request, null); } @Override public java.util.concurrent.Future createIngressPointAsync(final CreateIngressPointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateIngressPointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateIngressPointResult call() throws Exception { CreateIngressPointResult result = null; try { result = executeCreateIngressPoint(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 createRelayAsync(CreateRelayRequest request) { return createRelayAsync(request, null); } @Override public java.util.concurrent.Future createRelayAsync(final CreateRelayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRelayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRelayResult call() throws Exception { CreateRelayResult result = null; try { result = executeCreateRelay(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 createRuleSetAsync(CreateRuleSetRequest request) { return createRuleSetAsync(request, null); } @Override public java.util.concurrent.Future createRuleSetAsync(final CreateRuleSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRuleSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRuleSetResult call() throws Exception { CreateRuleSetResult result = null; try { result = executeCreateRuleSet(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 createTrafficPolicyAsync(CreateTrafficPolicyRequest request) { return createTrafficPolicyAsync(request, null); } @Override public java.util.concurrent.Future createTrafficPolicyAsync(final CreateTrafficPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTrafficPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTrafficPolicyResult call() throws Exception { CreateTrafficPolicyResult result = null; try { result = executeCreateTrafficPolicy(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 deleteAddonInstanceAsync(DeleteAddonInstanceRequest request) { return deleteAddonInstanceAsync(request, null); } @Override public java.util.concurrent.Future deleteAddonInstanceAsync(final DeleteAddonInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteAddonInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteAddonInstanceResult call() throws Exception { DeleteAddonInstanceResult result = null; try { result = executeDeleteAddonInstance(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 deleteAddonSubscriptionAsync(DeleteAddonSubscriptionRequest request) { return deleteAddonSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future deleteAddonSubscriptionAsync(final DeleteAddonSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteAddonSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteAddonSubscriptionResult call() throws Exception { DeleteAddonSubscriptionResult result = null; try { result = executeDeleteAddonSubscription(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 deleteArchiveAsync(DeleteArchiveRequest request) { return deleteArchiveAsync(request, null); } @Override public java.util.concurrent.Future deleteArchiveAsync(final DeleteArchiveRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteArchiveRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteArchiveResult call() throws Exception { DeleteArchiveResult result = null; try { result = executeDeleteArchive(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 deleteIngressPointAsync(DeleteIngressPointRequest request) { return deleteIngressPointAsync(request, null); } @Override public java.util.concurrent.Future deleteIngressPointAsync(final DeleteIngressPointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteIngressPointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteIngressPointResult call() throws Exception { DeleteIngressPointResult result = null; try { result = executeDeleteIngressPoint(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 deleteRelayAsync(DeleteRelayRequest request) { return deleteRelayAsync(request, null); } @Override public java.util.concurrent.Future deleteRelayAsync(final DeleteRelayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRelayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRelayResult call() throws Exception { DeleteRelayResult result = null; try { result = executeDeleteRelay(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 deleteRuleSetAsync(DeleteRuleSetRequest request) { return deleteRuleSetAsync(request, null); } @Override public java.util.concurrent.Future deleteRuleSetAsync(final DeleteRuleSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRuleSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRuleSetResult call() throws Exception { DeleteRuleSetResult result = null; try { result = executeDeleteRuleSet(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 deleteTrafficPolicyAsync(DeleteTrafficPolicyRequest request) { return deleteTrafficPolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteTrafficPolicyAsync(final DeleteTrafficPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTrafficPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTrafficPolicyResult call() throws Exception { DeleteTrafficPolicyResult result = null; try { result = executeDeleteTrafficPolicy(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 getAddonInstanceAsync(GetAddonInstanceRequest request) { return getAddonInstanceAsync(request, null); } @Override public java.util.concurrent.Future getAddonInstanceAsync(final GetAddonInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAddonInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAddonInstanceResult call() throws Exception { GetAddonInstanceResult result = null; try { result = executeGetAddonInstance(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 getAddonSubscriptionAsync(GetAddonSubscriptionRequest request) { return getAddonSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future getAddonSubscriptionAsync(final GetAddonSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAddonSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAddonSubscriptionResult call() throws Exception { GetAddonSubscriptionResult result = null; try { result = executeGetAddonSubscription(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 getArchiveAsync(GetArchiveRequest request) { return getArchiveAsync(request, null); } @Override public java.util.concurrent.Future getArchiveAsync(final GetArchiveRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetArchiveRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetArchiveResult call() throws Exception { GetArchiveResult result = null; try { result = executeGetArchive(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 getArchiveExportAsync(GetArchiveExportRequest request) { return getArchiveExportAsync(request, null); } @Override public java.util.concurrent.Future getArchiveExportAsync(final GetArchiveExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetArchiveExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetArchiveExportResult call() throws Exception { GetArchiveExportResult result = null; try { result = executeGetArchiveExport(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 getArchiveMessageAsync(GetArchiveMessageRequest request) { return getArchiveMessageAsync(request, null); } @Override public java.util.concurrent.Future getArchiveMessageAsync(final GetArchiveMessageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetArchiveMessageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetArchiveMessageResult call() throws Exception { GetArchiveMessageResult result = null; try { result = executeGetArchiveMessage(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 getArchiveMessageContentAsync(GetArchiveMessageContentRequest request) { return getArchiveMessageContentAsync(request, null); } @Override public java.util.concurrent.Future getArchiveMessageContentAsync(final GetArchiveMessageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetArchiveMessageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetArchiveMessageContentResult call() throws Exception { GetArchiveMessageContentResult result = null; try { result = executeGetArchiveMessageContent(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 getArchiveSearchAsync(GetArchiveSearchRequest request) { return getArchiveSearchAsync(request, null); } @Override public java.util.concurrent.Future getArchiveSearchAsync(final GetArchiveSearchRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetArchiveSearchRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetArchiveSearchResult call() throws Exception { GetArchiveSearchResult result = null; try { result = executeGetArchiveSearch(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 getArchiveSearchResultsAsync(GetArchiveSearchResultsRequest request) { return getArchiveSearchResultsAsync(request, null); } @Override public java.util.concurrent.Future getArchiveSearchResultsAsync(final GetArchiveSearchResultsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetArchiveSearchResultsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetArchiveSearchResultsResult call() throws Exception { GetArchiveSearchResultsResult result = null; try { result = executeGetArchiveSearchResults(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 getIngressPointAsync(GetIngressPointRequest request) { return getIngressPointAsync(request, null); } @Override public java.util.concurrent.Future getIngressPointAsync(final GetIngressPointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetIngressPointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetIngressPointResult call() throws Exception { GetIngressPointResult result = null; try { result = executeGetIngressPoint(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 getRelayAsync(GetRelayRequest request) { return getRelayAsync(request, null); } @Override public java.util.concurrent.Future getRelayAsync(final GetRelayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRelayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRelayResult call() throws Exception { GetRelayResult result = null; try { result = executeGetRelay(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 getRuleSetAsync(GetRuleSetRequest request) { return getRuleSetAsync(request, null); } @Override public java.util.concurrent.Future getRuleSetAsync(final GetRuleSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRuleSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRuleSetResult call() throws Exception { GetRuleSetResult result = null; try { result = executeGetRuleSet(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 getTrafficPolicyAsync(GetTrafficPolicyRequest request) { return getTrafficPolicyAsync(request, null); } @Override public java.util.concurrent.Future getTrafficPolicyAsync(final GetTrafficPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTrafficPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTrafficPolicyResult call() throws Exception { GetTrafficPolicyResult result = null; try { result = executeGetTrafficPolicy(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 listAddonInstancesAsync(ListAddonInstancesRequest request) { return listAddonInstancesAsync(request, null); } @Override public java.util.concurrent.Future listAddonInstancesAsync(final ListAddonInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAddonInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAddonInstancesResult call() throws Exception { ListAddonInstancesResult result = null; try { result = executeListAddonInstances(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 listAddonSubscriptionsAsync(ListAddonSubscriptionsRequest request) { return listAddonSubscriptionsAsync(request, null); } @Override public java.util.concurrent.Future listAddonSubscriptionsAsync(final ListAddonSubscriptionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAddonSubscriptionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAddonSubscriptionsResult call() throws Exception { ListAddonSubscriptionsResult result = null; try { result = executeListAddonSubscriptions(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 listArchiveExportsAsync(ListArchiveExportsRequest request) { return listArchiveExportsAsync(request, null); } @Override public java.util.concurrent.Future listArchiveExportsAsync(final ListArchiveExportsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListArchiveExportsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListArchiveExportsResult call() throws Exception { ListArchiveExportsResult result = null; try { result = executeListArchiveExports(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 listArchiveSearchesAsync(ListArchiveSearchesRequest request) { return listArchiveSearchesAsync(request, null); } @Override public java.util.concurrent.Future listArchiveSearchesAsync(final ListArchiveSearchesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListArchiveSearchesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListArchiveSearchesResult call() throws Exception { ListArchiveSearchesResult result = null; try { result = executeListArchiveSearches(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 listArchivesAsync(ListArchivesRequest request) { return listArchivesAsync(request, null); } @Override public java.util.concurrent.Future listArchivesAsync(final ListArchivesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListArchivesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListArchivesResult call() throws Exception { ListArchivesResult result = null; try { result = executeListArchives(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 listIngressPointsAsync(ListIngressPointsRequest request) { return listIngressPointsAsync(request, null); } @Override public java.util.concurrent.Future listIngressPointsAsync(final ListIngressPointsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListIngressPointsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListIngressPointsResult call() throws Exception { ListIngressPointsResult result = null; try { result = executeListIngressPoints(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 listRelaysAsync(ListRelaysRequest request) { return listRelaysAsync(request, null); } @Override public java.util.concurrent.Future listRelaysAsync(final ListRelaysRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRelaysRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRelaysResult call() throws Exception { ListRelaysResult result = null; try { result = executeListRelays(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 listRuleSetsAsync(ListRuleSetsRequest request) { return listRuleSetsAsync(request, null); } @Override public java.util.concurrent.Future listRuleSetsAsync(final ListRuleSetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRuleSetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRuleSetsResult call() throws Exception { ListRuleSetsResult result = null; try { result = executeListRuleSets(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 listTrafficPoliciesAsync(ListTrafficPoliciesRequest request) { return listTrafficPoliciesAsync(request, null); } @Override public java.util.concurrent.Future listTrafficPoliciesAsync(final ListTrafficPoliciesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTrafficPoliciesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTrafficPoliciesResult call() throws Exception { ListTrafficPoliciesResult result = null; try { result = executeListTrafficPolicies(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 startArchiveExportAsync(StartArchiveExportRequest request) { return startArchiveExportAsync(request, null); } @Override public java.util.concurrent.Future startArchiveExportAsync(final StartArchiveExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartArchiveExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartArchiveExportResult call() throws Exception { StartArchiveExportResult result = null; try { result = executeStartArchiveExport(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 startArchiveSearchAsync(StartArchiveSearchRequest request) { return startArchiveSearchAsync(request, null); } @Override public java.util.concurrent.Future startArchiveSearchAsync(final StartArchiveSearchRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartArchiveSearchRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartArchiveSearchResult call() throws Exception { StartArchiveSearchResult result = null; try { result = executeStartArchiveSearch(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 stopArchiveExportAsync(StopArchiveExportRequest request) { return stopArchiveExportAsync(request, null); } @Override public java.util.concurrent.Future stopArchiveExportAsync(final StopArchiveExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopArchiveExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopArchiveExportResult call() throws Exception { StopArchiveExportResult result = null; try { result = executeStopArchiveExport(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 stopArchiveSearchAsync(StopArchiveSearchRequest request) { return stopArchiveSearchAsync(request, null); } @Override public java.util.concurrent.Future stopArchiveSearchAsync(final StopArchiveSearchRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopArchiveSearchRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopArchiveSearchResult call() throws Exception { StopArchiveSearchResult result = null; try { result = executeStopArchiveSearch(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 updateArchiveAsync(UpdateArchiveRequest request) { return updateArchiveAsync(request, null); } @Override public java.util.concurrent.Future updateArchiveAsync(final UpdateArchiveRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateArchiveRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateArchiveResult call() throws Exception { UpdateArchiveResult result = null; try { result = executeUpdateArchive(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 updateIngressPointAsync(UpdateIngressPointRequest request) { return updateIngressPointAsync(request, null); } @Override public java.util.concurrent.Future updateIngressPointAsync(final UpdateIngressPointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateIngressPointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateIngressPointResult call() throws Exception { UpdateIngressPointResult result = null; try { result = executeUpdateIngressPoint(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 updateRelayAsync(UpdateRelayRequest request) { return updateRelayAsync(request, null); } @Override public java.util.concurrent.Future updateRelayAsync(final UpdateRelayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRelayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRelayResult call() throws Exception { UpdateRelayResult result = null; try { result = executeUpdateRelay(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 updateRuleSetAsync(UpdateRuleSetRequest request) { return updateRuleSetAsync(request, null); } @Override public java.util.concurrent.Future updateRuleSetAsync(final UpdateRuleSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRuleSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRuleSetResult call() throws Exception { UpdateRuleSetResult result = null; try { result = executeUpdateRuleSet(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 updateTrafficPolicyAsync(UpdateTrafficPolicyRequest request) { return updateTrafficPolicyAsync(request, null); } @Override public java.util.concurrent.Future updateTrafficPolicyAsync(final UpdateTrafficPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateTrafficPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateTrafficPolicyResult call() throws Exception { UpdateTrafficPolicyResult result = null; try { result = executeUpdateTrafficPolicy(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(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy