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

com.amazonaws.services.ssmcontacts.AWSSSMContactsAsyncClient Maven / Gradle / Ivy

/*
 * 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.ssmcontacts;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

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

*

* Systems Manager Incident Manager is an incident management console designed to help users mitigate and recover from * incidents affecting their Amazon Web Services-hosted applications. An incident is any unplanned interruption or * reduction in quality of services. *

*

* Incident Manager increases incident resolution by notifying responders of impact, highlighting relevant * troubleshooting data, and providing collaboration tools to get services back up and running. To achieve the primary * goal of reducing the time-to-resolution of critical incidents, Incident Manager automates response plans and enables * responder team escalation. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSSSMContactsAsyncClient extends AWSSSMContactsClient implements AWSSSMContactsAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSSSMContactsAsyncClientBuilder asyncBuilder() { return AWSSSMContactsAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on SSM Contacts using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSSSMContactsAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on SSM Contacts using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSSSMContactsAsyncClient(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 acceptPageAsync(AcceptPageRequest request) { return acceptPageAsync(request, null); } @Override public java.util.concurrent.Future acceptPageAsync(final AcceptPageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AcceptPageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AcceptPageResult call() throws Exception { AcceptPageResult result = null; try { result = executeAcceptPage(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 activateContactChannelAsync(ActivateContactChannelRequest request) { return activateContactChannelAsync(request, null); } @Override public java.util.concurrent.Future activateContactChannelAsync(final ActivateContactChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ActivateContactChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ActivateContactChannelResult call() throws Exception { ActivateContactChannelResult result = null; try { result = executeActivateContactChannel(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 createContactAsync(CreateContactRequest request) { return createContactAsync(request, null); } @Override public java.util.concurrent.Future createContactAsync(final CreateContactRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateContactRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateContactResult call() throws Exception { CreateContactResult result = null; try { result = executeCreateContact(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 createContactChannelAsync(CreateContactChannelRequest request) { return createContactChannelAsync(request, null); } @Override public java.util.concurrent.Future createContactChannelAsync(final CreateContactChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateContactChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateContactChannelResult call() throws Exception { CreateContactChannelResult result = null; try { result = executeCreateContactChannel(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 createRotationAsync(CreateRotationRequest request) { return createRotationAsync(request, null); } @Override public java.util.concurrent.Future createRotationAsync(final CreateRotationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRotationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRotationResult call() throws Exception { CreateRotationResult result = null; try { result = executeCreateRotation(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 createRotationOverrideAsync(CreateRotationOverrideRequest request) { return createRotationOverrideAsync(request, null); } @Override public java.util.concurrent.Future createRotationOverrideAsync(final CreateRotationOverrideRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRotationOverrideRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRotationOverrideResult call() throws Exception { CreateRotationOverrideResult result = null; try { result = executeCreateRotationOverride(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 deactivateContactChannelAsync(DeactivateContactChannelRequest request) { return deactivateContactChannelAsync(request, null); } @Override public java.util.concurrent.Future deactivateContactChannelAsync(final DeactivateContactChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeactivateContactChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeactivateContactChannelResult call() throws Exception { DeactivateContactChannelResult result = null; try { result = executeDeactivateContactChannel(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 deleteContactAsync(DeleteContactRequest request) { return deleteContactAsync(request, null); } @Override public java.util.concurrent.Future deleteContactAsync(final DeleteContactRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteContactRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteContactResult call() throws Exception { DeleteContactResult result = null; try { result = executeDeleteContact(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 deleteContactChannelAsync(DeleteContactChannelRequest request) { return deleteContactChannelAsync(request, null); } @Override public java.util.concurrent.Future deleteContactChannelAsync(final DeleteContactChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteContactChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteContactChannelResult call() throws Exception { DeleteContactChannelResult result = null; try { result = executeDeleteContactChannel(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 deleteRotationAsync(DeleteRotationRequest request) { return deleteRotationAsync(request, null); } @Override public java.util.concurrent.Future deleteRotationAsync(final DeleteRotationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRotationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRotationResult call() throws Exception { DeleteRotationResult result = null; try { result = executeDeleteRotation(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 deleteRotationOverrideAsync(DeleteRotationOverrideRequest request) { return deleteRotationOverrideAsync(request, null); } @Override public java.util.concurrent.Future deleteRotationOverrideAsync(final DeleteRotationOverrideRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRotationOverrideRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRotationOverrideResult call() throws Exception { DeleteRotationOverrideResult result = null; try { result = executeDeleteRotationOverride(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 describeEngagementAsync(DescribeEngagementRequest request) { return describeEngagementAsync(request, null); } @Override public java.util.concurrent.Future describeEngagementAsync(final DescribeEngagementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEngagementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEngagementResult call() throws Exception { DescribeEngagementResult result = null; try { result = executeDescribeEngagement(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 describePageAsync(DescribePageRequest request) { return describePageAsync(request, null); } @Override public java.util.concurrent.Future describePageAsync(final DescribePageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePageResult call() throws Exception { DescribePageResult result = null; try { result = executeDescribePage(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 getContactAsync(GetContactRequest request) { return getContactAsync(request, null); } @Override public java.util.concurrent.Future getContactAsync(final GetContactRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetContactRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetContactResult call() throws Exception { GetContactResult result = null; try { result = executeGetContact(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 getContactChannelAsync(GetContactChannelRequest request) { return getContactChannelAsync(request, null); } @Override public java.util.concurrent.Future getContactChannelAsync(final GetContactChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetContactChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetContactChannelResult call() throws Exception { GetContactChannelResult result = null; try { result = executeGetContactChannel(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 getContactPolicyAsync(GetContactPolicyRequest request) { return getContactPolicyAsync(request, null); } @Override public java.util.concurrent.Future getContactPolicyAsync(final GetContactPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetContactPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetContactPolicyResult call() throws Exception { GetContactPolicyResult result = null; try { result = executeGetContactPolicy(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 getRotationAsync(GetRotationRequest request) { return getRotationAsync(request, null); } @Override public java.util.concurrent.Future getRotationAsync(final GetRotationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRotationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRotationResult call() throws Exception { GetRotationResult result = null; try { result = executeGetRotation(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 getRotationOverrideAsync(GetRotationOverrideRequest request) { return getRotationOverrideAsync(request, null); } @Override public java.util.concurrent.Future getRotationOverrideAsync(final GetRotationOverrideRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRotationOverrideRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRotationOverrideResult call() throws Exception { GetRotationOverrideResult result = null; try { result = executeGetRotationOverride(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 listContactChannelsAsync(ListContactChannelsRequest request) { return listContactChannelsAsync(request, null); } @Override public java.util.concurrent.Future listContactChannelsAsync(final ListContactChannelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListContactChannelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListContactChannelsResult call() throws Exception { ListContactChannelsResult result = null; try { result = executeListContactChannels(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 listContactsAsync(ListContactsRequest request) { return listContactsAsync(request, null); } @Override public java.util.concurrent.Future listContactsAsync(final ListContactsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListContactsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListContactsResult call() throws Exception { ListContactsResult result = null; try { result = executeListContacts(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 listEngagementsAsync(ListEngagementsRequest request) { return listEngagementsAsync(request, null); } @Override public java.util.concurrent.Future listEngagementsAsync(final ListEngagementsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEngagementsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEngagementsResult call() throws Exception { ListEngagementsResult result = null; try { result = executeListEngagements(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 listPageReceiptsAsync(ListPageReceiptsRequest request) { return listPageReceiptsAsync(request, null); } @Override public java.util.concurrent.Future listPageReceiptsAsync(final ListPageReceiptsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPageReceiptsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPageReceiptsResult call() throws Exception { ListPageReceiptsResult result = null; try { result = executeListPageReceipts(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 listPageResolutionsAsync(ListPageResolutionsRequest request) { return listPageResolutionsAsync(request, null); } @Override public java.util.concurrent.Future listPageResolutionsAsync(final ListPageResolutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPageResolutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPageResolutionsResult call() throws Exception { ListPageResolutionsResult result = null; try { result = executeListPageResolutions(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 listPagesByContactAsync(ListPagesByContactRequest request) { return listPagesByContactAsync(request, null); } @Override public java.util.concurrent.Future listPagesByContactAsync(final ListPagesByContactRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPagesByContactRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPagesByContactResult call() throws Exception { ListPagesByContactResult result = null; try { result = executeListPagesByContact(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 listPagesByEngagementAsync(ListPagesByEngagementRequest request) { return listPagesByEngagementAsync(request, null); } @Override public java.util.concurrent.Future listPagesByEngagementAsync(final ListPagesByEngagementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPagesByEngagementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPagesByEngagementResult call() throws Exception { ListPagesByEngagementResult result = null; try { result = executeListPagesByEngagement(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 listPreviewRotationShiftsAsync(ListPreviewRotationShiftsRequest request) { return listPreviewRotationShiftsAsync(request, null); } @Override public java.util.concurrent.Future listPreviewRotationShiftsAsync(final ListPreviewRotationShiftsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPreviewRotationShiftsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPreviewRotationShiftsResult call() throws Exception { ListPreviewRotationShiftsResult result = null; try { result = executeListPreviewRotationShifts(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 listRotationOverridesAsync(ListRotationOverridesRequest request) { return listRotationOverridesAsync(request, null); } @Override public java.util.concurrent.Future listRotationOverridesAsync(final ListRotationOverridesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRotationOverridesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRotationOverridesResult call() throws Exception { ListRotationOverridesResult result = null; try { result = executeListRotationOverrides(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 listRotationShiftsAsync(ListRotationShiftsRequest request) { return listRotationShiftsAsync(request, null); } @Override public java.util.concurrent.Future listRotationShiftsAsync(final ListRotationShiftsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRotationShiftsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRotationShiftsResult call() throws Exception { ListRotationShiftsResult result = null; try { result = executeListRotationShifts(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 listRotationsAsync(ListRotationsRequest request) { return listRotationsAsync(request, null); } @Override public java.util.concurrent.Future listRotationsAsync(final ListRotationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRotationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRotationsResult call() throws Exception { ListRotationsResult result = null; try { result = executeListRotations(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 putContactPolicyAsync(PutContactPolicyRequest request) { return putContactPolicyAsync(request, null); } @Override public java.util.concurrent.Future putContactPolicyAsync(final PutContactPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutContactPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutContactPolicyResult call() throws Exception { PutContactPolicyResult result = null; try { result = executePutContactPolicy(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 sendActivationCodeAsync(SendActivationCodeRequest request) { return sendActivationCodeAsync(request, null); } @Override public java.util.concurrent.Future sendActivationCodeAsync(final SendActivationCodeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SendActivationCodeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SendActivationCodeResult call() throws Exception { SendActivationCodeResult result = null; try { result = executeSendActivationCode(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 startEngagementAsync(StartEngagementRequest request) { return startEngagementAsync(request, null); } @Override public java.util.concurrent.Future startEngagementAsync(final StartEngagementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartEngagementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartEngagementResult call() throws Exception { StartEngagementResult result = null; try { result = executeStartEngagement(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 stopEngagementAsync(StopEngagementRequest request) { return stopEngagementAsync(request, null); } @Override public java.util.concurrent.Future stopEngagementAsync(final StopEngagementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopEngagementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopEngagementResult call() throws Exception { StopEngagementResult result = null; try { result = executeStopEngagement(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 updateContactAsync(UpdateContactRequest request) { return updateContactAsync(request, null); } @Override public java.util.concurrent.Future updateContactAsync(final UpdateContactRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateContactRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateContactResult call() throws Exception { UpdateContactResult result = null; try { result = executeUpdateContact(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 updateContactChannelAsync(UpdateContactChannelRequest request) { return updateContactChannelAsync(request, null); } @Override public java.util.concurrent.Future updateContactChannelAsync(final UpdateContactChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateContactChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateContactChannelResult call() throws Exception { UpdateContactChannelResult result = null; try { result = executeUpdateContactChannel(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 updateRotationAsync(UpdateRotationRequest request) { return updateRotationAsync(request, null); } @Override public java.util.concurrent.Future updateRotationAsync(final UpdateRotationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRotationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRotationResult call() throws Exception { UpdateRotationResult result = null; try { result = executeUpdateRotation(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