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

com.amazonaws.services.devopsguru.AmazonDevOpsGuruAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show 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.devopsguru;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Amazon DevOps Guru asynchronously. Each asynchronous method will return a Java Future object
 * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

*

* Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in business critical * operational applications. You specify the Amazon Web Services resources that you want DevOps Guru to cover, then the * Amazon CloudWatch metrics and Amazon Web Services CloudTrail events related to those resources are analyzed. When * anomalous behavior is detected, DevOps Guru creates an insight that includes recommendations, related events, * and related metrics that can help you improve your operational applications. For more information, see What is Amazon DevOps Guru. *

*

* You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight is * created. You can also enable DevOps Guru to generate an OpsItem in Amazon Web Services Systems Manager for each * insight to help you manage and track your work addressing insights. *

*

* To learn about the DevOps Guru workflow, see How DevOps Guru works. * To learn about DevOps Guru concepts, see Concepts in DevOps Guru. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonDevOpsGuruAsyncClient extends AmazonDevOpsGuruClient implements AmazonDevOpsGuruAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonDevOpsGuruAsyncClientBuilder asyncBuilder() { return AmazonDevOpsGuruAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon DevOps Guru using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonDevOpsGuruAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon DevOps Guru using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonDevOpsGuruAsyncClient(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 addNotificationChannelAsync(AddNotificationChannelRequest request) { return addNotificationChannelAsync(request, null); } @Override public java.util.concurrent.Future addNotificationChannelAsync(final AddNotificationChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddNotificationChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddNotificationChannelResult call() throws Exception { AddNotificationChannelResult result = null; try { result = executeAddNotificationChannel(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 deleteInsightAsync(DeleteInsightRequest request) { return deleteInsightAsync(request, null); } @Override public java.util.concurrent.Future deleteInsightAsync(final DeleteInsightRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteInsightRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteInsightResult call() throws Exception { DeleteInsightResult result = null; try { result = executeDeleteInsight(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 describeAccountHealthAsync(DescribeAccountHealthRequest request) { return describeAccountHealthAsync(request, null); } @Override public java.util.concurrent.Future describeAccountHealthAsync(final DescribeAccountHealthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAccountHealthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAccountHealthResult call() throws Exception { DescribeAccountHealthResult result = null; try { result = executeDescribeAccountHealth(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 describeAccountOverviewAsync(DescribeAccountOverviewRequest request) { return describeAccountOverviewAsync(request, null); } @Override public java.util.concurrent.Future describeAccountOverviewAsync(final DescribeAccountOverviewRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAccountOverviewRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAccountOverviewResult call() throws Exception { DescribeAccountOverviewResult result = null; try { result = executeDescribeAccountOverview(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 describeAnomalyAsync(DescribeAnomalyRequest request) { return describeAnomalyAsync(request, null); } @Override public java.util.concurrent.Future describeAnomalyAsync(final DescribeAnomalyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAnomalyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAnomalyResult call() throws Exception { DescribeAnomalyResult result = null; try { result = executeDescribeAnomaly(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 describeEventSourcesConfigAsync(DescribeEventSourcesConfigRequest request) { return describeEventSourcesConfigAsync(request, null); } @Override public java.util.concurrent.Future describeEventSourcesConfigAsync(final DescribeEventSourcesConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEventSourcesConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEventSourcesConfigResult call() throws Exception { DescribeEventSourcesConfigResult result = null; try { result = executeDescribeEventSourcesConfig(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 describeFeedbackAsync(DescribeFeedbackRequest request) { return describeFeedbackAsync(request, null); } @Override public java.util.concurrent.Future describeFeedbackAsync(final DescribeFeedbackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFeedbackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFeedbackResult call() throws Exception { DescribeFeedbackResult result = null; try { result = executeDescribeFeedback(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 describeInsightAsync(DescribeInsightRequest request) { return describeInsightAsync(request, null); } @Override public java.util.concurrent.Future describeInsightAsync(final DescribeInsightRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeInsightRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeInsightResult call() throws Exception { DescribeInsightResult result = null; try { result = executeDescribeInsight(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 describeOrganizationHealthAsync(DescribeOrganizationHealthRequest request) { return describeOrganizationHealthAsync(request, null); } @Override public java.util.concurrent.Future describeOrganizationHealthAsync(final DescribeOrganizationHealthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeOrganizationHealthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeOrganizationHealthResult call() throws Exception { DescribeOrganizationHealthResult result = null; try { result = executeDescribeOrganizationHealth(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 describeOrganizationOverviewAsync(DescribeOrganizationOverviewRequest request) { return describeOrganizationOverviewAsync(request, null); } @Override public java.util.concurrent.Future describeOrganizationOverviewAsync(final DescribeOrganizationOverviewRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeOrganizationOverviewRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeOrganizationOverviewResult call() throws Exception { DescribeOrganizationOverviewResult result = null; try { result = executeDescribeOrganizationOverview(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 describeOrganizationResourceCollectionHealthAsync( DescribeOrganizationResourceCollectionHealthRequest request) { return describeOrganizationResourceCollectionHealthAsync(request, null); } @Override public java.util.concurrent.Future describeOrganizationResourceCollectionHealthAsync( final DescribeOrganizationResourceCollectionHealthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeOrganizationResourceCollectionHealthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeOrganizationResourceCollectionHealthResult call() throws Exception { DescribeOrganizationResourceCollectionHealthResult result = null; try { result = executeDescribeOrganizationResourceCollectionHealth(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 describeResourceCollectionHealthAsync( DescribeResourceCollectionHealthRequest request) { return describeResourceCollectionHealthAsync(request, null); } @Override public java.util.concurrent.Future describeResourceCollectionHealthAsync( final DescribeResourceCollectionHealthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeResourceCollectionHealthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeResourceCollectionHealthResult call() throws Exception { DescribeResourceCollectionHealthResult result = null; try { result = executeDescribeResourceCollectionHealth(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 describeServiceIntegrationAsync(DescribeServiceIntegrationRequest request) { return describeServiceIntegrationAsync(request, null); } @Override public java.util.concurrent.Future describeServiceIntegrationAsync(final DescribeServiceIntegrationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeServiceIntegrationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeServiceIntegrationResult call() throws Exception { DescribeServiceIntegrationResult result = null; try { result = executeDescribeServiceIntegration(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 getCostEstimationAsync(GetCostEstimationRequest request) { return getCostEstimationAsync(request, null); } @Override public java.util.concurrent.Future getCostEstimationAsync(final GetCostEstimationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCostEstimationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCostEstimationResult call() throws Exception { GetCostEstimationResult result = null; try { result = executeGetCostEstimation(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 getResourceCollectionAsync(GetResourceCollectionRequest request) { return getResourceCollectionAsync(request, null); } @Override public java.util.concurrent.Future getResourceCollectionAsync(final GetResourceCollectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetResourceCollectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetResourceCollectionResult call() throws Exception { GetResourceCollectionResult result = null; try { result = executeGetResourceCollection(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 listAnomaliesForInsightAsync(ListAnomaliesForInsightRequest request) { return listAnomaliesForInsightAsync(request, null); } @Override public java.util.concurrent.Future listAnomaliesForInsightAsync(final ListAnomaliesForInsightRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAnomaliesForInsightRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAnomaliesForInsightResult call() throws Exception { ListAnomaliesForInsightResult result = null; try { result = executeListAnomaliesForInsight(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 listAnomalousLogGroupsAsync(ListAnomalousLogGroupsRequest request) { return listAnomalousLogGroupsAsync(request, null); } @Override public java.util.concurrent.Future listAnomalousLogGroupsAsync(final ListAnomalousLogGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAnomalousLogGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAnomalousLogGroupsResult call() throws Exception { ListAnomalousLogGroupsResult result = null; try { result = executeListAnomalousLogGroups(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 listEventsAsync(ListEventsRequest request) { return listEventsAsync(request, null); } @Override public java.util.concurrent.Future listEventsAsync(final ListEventsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEventsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEventsResult call() throws Exception { ListEventsResult result = null; try { result = executeListEvents(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 listInsightsAsync(ListInsightsRequest request) { return listInsightsAsync(request, null); } @Override public java.util.concurrent.Future listInsightsAsync(final ListInsightsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInsightsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInsightsResult call() throws Exception { ListInsightsResult result = null; try { result = executeListInsights(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 listMonitoredResourcesAsync(ListMonitoredResourcesRequest request) { return listMonitoredResourcesAsync(request, null); } @Override public java.util.concurrent.Future listMonitoredResourcesAsync(final ListMonitoredResourcesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMonitoredResourcesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMonitoredResourcesResult call() throws Exception { ListMonitoredResourcesResult result = null; try { result = executeListMonitoredResources(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 listNotificationChannelsAsync(ListNotificationChannelsRequest request) { return listNotificationChannelsAsync(request, null); } @Override public java.util.concurrent.Future listNotificationChannelsAsync(final ListNotificationChannelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListNotificationChannelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListNotificationChannelsResult call() throws Exception { ListNotificationChannelsResult result = null; try { result = executeListNotificationChannels(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 listOrganizationInsightsAsync(ListOrganizationInsightsRequest request) { return listOrganizationInsightsAsync(request, null); } @Override public java.util.concurrent.Future listOrganizationInsightsAsync(final ListOrganizationInsightsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListOrganizationInsightsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListOrganizationInsightsResult call() throws Exception { ListOrganizationInsightsResult result = null; try { result = executeListOrganizationInsights(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 listRecommendationsAsync(ListRecommendationsRequest request) { return listRecommendationsAsync(request, null); } @Override public java.util.concurrent.Future listRecommendationsAsync(final ListRecommendationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRecommendationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRecommendationsResult call() throws Exception { ListRecommendationsResult result = null; try { result = executeListRecommendations(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 putFeedbackAsync(PutFeedbackRequest request) { return putFeedbackAsync(request, null); } @Override public java.util.concurrent.Future putFeedbackAsync(final PutFeedbackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutFeedbackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutFeedbackResult call() throws Exception { PutFeedbackResult result = null; try { result = executePutFeedback(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 removeNotificationChannelAsync(RemoveNotificationChannelRequest request) { return removeNotificationChannelAsync(request, null); } @Override public java.util.concurrent.Future removeNotificationChannelAsync(final RemoveNotificationChannelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveNotificationChannelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveNotificationChannelResult call() throws Exception { RemoveNotificationChannelResult result = null; try { result = executeRemoveNotificationChannel(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 searchInsightsAsync(SearchInsightsRequest request) { return searchInsightsAsync(request, null); } @Override public java.util.concurrent.Future searchInsightsAsync(final SearchInsightsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchInsightsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchInsightsResult call() throws Exception { SearchInsightsResult result = null; try { result = executeSearchInsights(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 searchOrganizationInsightsAsync(SearchOrganizationInsightsRequest request) { return searchOrganizationInsightsAsync(request, null); } @Override public java.util.concurrent.Future searchOrganizationInsightsAsync(final SearchOrganizationInsightsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchOrganizationInsightsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchOrganizationInsightsResult call() throws Exception { SearchOrganizationInsightsResult result = null; try { result = executeSearchOrganizationInsights(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 startCostEstimationAsync(StartCostEstimationRequest request) { return startCostEstimationAsync(request, null); } @Override public java.util.concurrent.Future startCostEstimationAsync(final StartCostEstimationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartCostEstimationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartCostEstimationResult call() throws Exception { StartCostEstimationResult result = null; try { result = executeStartCostEstimation(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 updateEventSourcesConfigAsync(UpdateEventSourcesConfigRequest request) { return updateEventSourcesConfigAsync(request, null); } @Override public java.util.concurrent.Future updateEventSourcesConfigAsync(final UpdateEventSourcesConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateEventSourcesConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateEventSourcesConfigResult call() throws Exception { UpdateEventSourcesConfigResult result = null; try { result = executeUpdateEventSourcesConfig(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 updateResourceCollectionAsync(UpdateResourceCollectionRequest request) { return updateResourceCollectionAsync(request, null); } @Override public java.util.concurrent.Future updateResourceCollectionAsync(final UpdateResourceCollectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateResourceCollectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateResourceCollectionResult call() throws Exception { UpdateResourceCollectionResult result = null; try { result = executeUpdateResourceCollection(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 updateServiceIntegrationAsync(UpdateServiceIntegrationRequest request) { return updateServiceIntegrationAsync(request, null); } @Override public java.util.concurrent.Future updateServiceIntegrationAsync(final UpdateServiceIntegrationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateServiceIntegrationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateServiceIntegrationResult call() throws Exception { UpdateServiceIntegrationResult result = null; try { result = executeUpdateServiceIntegration(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 - 2024 Weber Informatics LLC | Privacy Policy