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

com.amazonaws.services.wellarchitected.AWSWellArchitectedAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Well-Architected Tool module holds the client classes that are used for communicating with AWS Well-Architected Tool Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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.wellarchitected;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Well-Architected 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 Well-Architected Tool *

* This is the AWS Well-Architected Tool API Reference. The AWS Well-Architected Tool API provides programmatic * access to the AWS Well-Architected Tool in the AWS Management Console. For information about the AWS * Well-Architected Tool, see the AWS * Well-Architected Tool User Guide. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSWellArchitectedAsyncClient extends AWSWellArchitectedClient implements AWSWellArchitectedAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSWellArchitectedAsyncClientBuilder asyncBuilder() { return AWSWellArchitectedAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Well-Architected using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSWellArchitectedAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Well-Architected using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSWellArchitectedAsyncClient(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 associateLensesAsync(AssociateLensesRequest request) { return associateLensesAsync(request, null); } @Override public java.util.concurrent.Future associateLensesAsync(final AssociateLensesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateLensesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateLensesResult call() throws Exception { AssociateLensesResult result = null; try { result = executeAssociateLenses(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 createMilestoneAsync(CreateMilestoneRequest request) { return createMilestoneAsync(request, null); } @Override public java.util.concurrent.Future createMilestoneAsync(final CreateMilestoneRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateMilestoneRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateMilestoneResult call() throws Exception { CreateMilestoneResult result = null; try { result = executeCreateMilestone(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 createWorkloadAsync(CreateWorkloadRequest request) { return createWorkloadAsync(request, null); } @Override public java.util.concurrent.Future createWorkloadAsync(final CreateWorkloadRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateWorkloadRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateWorkloadResult call() throws Exception { CreateWorkloadResult result = null; try { result = executeCreateWorkload(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 createWorkloadShareAsync(CreateWorkloadShareRequest request) { return createWorkloadShareAsync(request, null); } @Override public java.util.concurrent.Future createWorkloadShareAsync(final CreateWorkloadShareRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateWorkloadShareRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateWorkloadShareResult call() throws Exception { CreateWorkloadShareResult result = null; try { result = executeCreateWorkloadShare(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 deleteWorkloadAsync(DeleteWorkloadRequest request) { return deleteWorkloadAsync(request, null); } @Override public java.util.concurrent.Future deleteWorkloadAsync(final DeleteWorkloadRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteWorkloadRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteWorkloadResult call() throws Exception { DeleteWorkloadResult result = null; try { result = executeDeleteWorkload(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 deleteWorkloadShareAsync(DeleteWorkloadShareRequest request) { return deleteWorkloadShareAsync(request, null); } @Override public java.util.concurrent.Future deleteWorkloadShareAsync(final DeleteWorkloadShareRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteWorkloadShareRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteWorkloadShareResult call() throws Exception { DeleteWorkloadShareResult result = null; try { result = executeDeleteWorkloadShare(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 disassociateLensesAsync(DisassociateLensesRequest request) { return disassociateLensesAsync(request, null); } @Override public java.util.concurrent.Future disassociateLensesAsync(final DisassociateLensesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateLensesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateLensesResult call() throws Exception { DisassociateLensesResult result = null; try { result = executeDisassociateLenses(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 getAnswerAsync(GetAnswerRequest request) { return getAnswerAsync(request, null); } @Override public java.util.concurrent.Future getAnswerAsync(final GetAnswerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAnswerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAnswerResult call() throws Exception { GetAnswerResult result = null; try { result = executeGetAnswer(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 getLensReviewAsync(GetLensReviewRequest request) { return getLensReviewAsync(request, null); } @Override public java.util.concurrent.Future getLensReviewAsync(final GetLensReviewRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetLensReviewRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetLensReviewResult call() throws Exception { GetLensReviewResult result = null; try { result = executeGetLensReview(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 getLensReviewReportAsync(GetLensReviewReportRequest request) { return getLensReviewReportAsync(request, null); } @Override public java.util.concurrent.Future getLensReviewReportAsync(final GetLensReviewReportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetLensReviewReportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetLensReviewReportResult call() throws Exception { GetLensReviewReportResult result = null; try { result = executeGetLensReviewReport(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 getLensVersionDifferenceAsync(GetLensVersionDifferenceRequest request) { return getLensVersionDifferenceAsync(request, null); } @Override public java.util.concurrent.Future getLensVersionDifferenceAsync(final GetLensVersionDifferenceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetLensVersionDifferenceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetLensVersionDifferenceResult call() throws Exception { GetLensVersionDifferenceResult result = null; try { result = executeGetLensVersionDifference(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 getMilestoneAsync(GetMilestoneRequest request) { return getMilestoneAsync(request, null); } @Override public java.util.concurrent.Future getMilestoneAsync(final GetMilestoneRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetMilestoneRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetMilestoneResult call() throws Exception { GetMilestoneResult result = null; try { result = executeGetMilestone(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 getWorkloadAsync(GetWorkloadRequest request) { return getWorkloadAsync(request, null); } @Override public java.util.concurrent.Future getWorkloadAsync(final GetWorkloadRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetWorkloadRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetWorkloadResult call() throws Exception { GetWorkloadResult result = null; try { result = executeGetWorkload(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 listAnswersAsync(ListAnswersRequest request) { return listAnswersAsync(request, null); } @Override public java.util.concurrent.Future listAnswersAsync(final ListAnswersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAnswersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAnswersResult call() throws Exception { ListAnswersResult result = null; try { result = executeListAnswers(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 listLensReviewImprovementsAsync(ListLensReviewImprovementsRequest request) { return listLensReviewImprovementsAsync(request, null); } @Override public java.util.concurrent.Future listLensReviewImprovementsAsync(final ListLensReviewImprovementsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListLensReviewImprovementsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListLensReviewImprovementsResult call() throws Exception { ListLensReviewImprovementsResult result = null; try { result = executeListLensReviewImprovements(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 listLensReviewsAsync(ListLensReviewsRequest request) { return listLensReviewsAsync(request, null); } @Override public java.util.concurrent.Future listLensReviewsAsync(final ListLensReviewsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListLensReviewsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListLensReviewsResult call() throws Exception { ListLensReviewsResult result = null; try { result = executeListLensReviews(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 listLensesAsync(ListLensesRequest request) { return listLensesAsync(request, null); } @Override public java.util.concurrent.Future listLensesAsync(final ListLensesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListLensesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListLensesResult call() throws Exception { ListLensesResult result = null; try { result = executeListLenses(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 listMilestonesAsync(ListMilestonesRequest request) { return listMilestonesAsync(request, null); } @Override public java.util.concurrent.Future listMilestonesAsync(final ListMilestonesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMilestonesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMilestonesResult call() throws Exception { ListMilestonesResult result = null; try { result = executeListMilestones(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 listNotificationsAsync(ListNotificationsRequest request) { return listNotificationsAsync(request, null); } @Override public java.util.concurrent.Future listNotificationsAsync(final ListNotificationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListNotificationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListNotificationsResult call() throws Exception { ListNotificationsResult result = null; try { result = executeListNotifications(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 listShareInvitationsAsync(ListShareInvitationsRequest request) { return listShareInvitationsAsync(request, null); } @Override public java.util.concurrent.Future listShareInvitationsAsync(final ListShareInvitationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListShareInvitationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListShareInvitationsResult call() throws Exception { ListShareInvitationsResult result = null; try { result = executeListShareInvitations(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 listWorkloadSharesAsync(ListWorkloadSharesRequest request) { return listWorkloadSharesAsync(request, null); } @Override public java.util.concurrent.Future listWorkloadSharesAsync(final ListWorkloadSharesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListWorkloadSharesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListWorkloadSharesResult call() throws Exception { ListWorkloadSharesResult result = null; try { result = executeListWorkloadShares(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 listWorkloadsAsync(ListWorkloadsRequest request) { return listWorkloadsAsync(request, null); } @Override public java.util.concurrent.Future listWorkloadsAsync(final ListWorkloadsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListWorkloadsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListWorkloadsResult call() throws Exception { ListWorkloadsResult result = null; try { result = executeListWorkloads(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 updateAnswerAsync(UpdateAnswerRequest request) { return updateAnswerAsync(request, null); } @Override public java.util.concurrent.Future updateAnswerAsync(final UpdateAnswerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateAnswerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateAnswerResult call() throws Exception { UpdateAnswerResult result = null; try { result = executeUpdateAnswer(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 updateLensReviewAsync(UpdateLensReviewRequest request) { return updateLensReviewAsync(request, null); } @Override public java.util.concurrent.Future updateLensReviewAsync(final UpdateLensReviewRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateLensReviewRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateLensReviewResult call() throws Exception { UpdateLensReviewResult result = null; try { result = executeUpdateLensReview(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 updateShareInvitationAsync(UpdateShareInvitationRequest request) { return updateShareInvitationAsync(request, null); } @Override public java.util.concurrent.Future updateShareInvitationAsync(final UpdateShareInvitationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateShareInvitationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateShareInvitationResult call() throws Exception { UpdateShareInvitationResult result = null; try { result = executeUpdateShareInvitation(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 updateWorkloadAsync(UpdateWorkloadRequest request) { return updateWorkloadAsync(request, null); } @Override public java.util.concurrent.Future updateWorkloadAsync(final UpdateWorkloadRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateWorkloadRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateWorkloadResult call() throws Exception { UpdateWorkloadResult result = null; try { result = executeUpdateWorkload(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 updateWorkloadShareAsync(UpdateWorkloadShareRequest request) { return updateWorkloadShareAsync(request, null); } @Override public java.util.concurrent.Future updateWorkloadShareAsync(final UpdateWorkloadShareRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateWorkloadShareRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateWorkloadShareResult call() throws Exception { UpdateWorkloadShareResult result = null; try { result = executeUpdateWorkloadShare(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 upgradeLensReviewAsync(UpgradeLensReviewRequest request) { return upgradeLensReviewAsync(request, null); } @Override public java.util.concurrent.Future upgradeLensReviewAsync(final UpgradeLensReviewRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpgradeLensReviewRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpgradeLensReviewResult call() throws Exception { UpgradeLensReviewResult result = null; try { result = executeUpgradeLensReview(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