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

com.amazonaws.services.personalize.AmazonPersonalizeAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
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.personalize;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Amazon Personalize 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 Personalize is a machine learning service that makes it easy to add individualized recommendations to * customers. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonPersonalizeAsyncClient extends AmazonPersonalizeClient implements AmazonPersonalizeAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonPersonalizeAsyncClientBuilder asyncBuilder() { return AmazonPersonalizeAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Personalize using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonPersonalizeAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Personalize using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonPersonalizeAsyncClient(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 createBatchInferenceJobAsync(CreateBatchInferenceJobRequest request) { return createBatchInferenceJobAsync(request, null); } @Override public java.util.concurrent.Future createBatchInferenceJobAsync(final CreateBatchInferenceJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBatchInferenceJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBatchInferenceJobResult call() throws Exception { CreateBatchInferenceJobResult result = null; try { result = executeCreateBatchInferenceJob(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 createBatchSegmentJobAsync(CreateBatchSegmentJobRequest request) { return createBatchSegmentJobAsync(request, null); } @Override public java.util.concurrent.Future createBatchSegmentJobAsync(final CreateBatchSegmentJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBatchSegmentJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBatchSegmentJobResult call() throws Exception { CreateBatchSegmentJobResult result = null; try { result = executeCreateBatchSegmentJob(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 createCampaignAsync(CreateCampaignRequest request) { return createCampaignAsync(request, null); } @Override public java.util.concurrent.Future createCampaignAsync(final CreateCampaignRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCampaignRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCampaignResult call() throws Exception { CreateCampaignResult result = null; try { result = executeCreateCampaign(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 createDataDeletionJobAsync(CreateDataDeletionJobRequest request) { return createDataDeletionJobAsync(request, null); } @Override public java.util.concurrent.Future createDataDeletionJobAsync(final CreateDataDeletionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDataDeletionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDataDeletionJobResult call() throws Exception { CreateDataDeletionJobResult result = null; try { result = executeCreateDataDeletionJob(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 createDatasetAsync(CreateDatasetRequest request) { return createDatasetAsync(request, null); } @Override public java.util.concurrent.Future createDatasetAsync(final CreateDatasetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatasetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatasetResult call() throws Exception { CreateDatasetResult result = null; try { result = executeCreateDataset(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 createDatasetExportJobAsync(CreateDatasetExportJobRequest request) { return createDatasetExportJobAsync(request, null); } @Override public java.util.concurrent.Future createDatasetExportJobAsync(final CreateDatasetExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatasetExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatasetExportJobResult call() throws Exception { CreateDatasetExportJobResult result = null; try { result = executeCreateDatasetExportJob(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 createDatasetGroupAsync(CreateDatasetGroupRequest request) { return createDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future createDatasetGroupAsync(final CreateDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatasetGroupResult call() throws Exception { CreateDatasetGroupResult result = null; try { result = executeCreateDatasetGroup(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 createDatasetImportJobAsync(CreateDatasetImportJobRequest request) { return createDatasetImportJobAsync(request, null); } @Override public java.util.concurrent.Future createDatasetImportJobAsync(final CreateDatasetImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatasetImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatasetImportJobResult call() throws Exception { CreateDatasetImportJobResult result = null; try { result = executeCreateDatasetImportJob(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 createEventTrackerAsync(CreateEventTrackerRequest request) { return createEventTrackerAsync(request, null); } @Override public java.util.concurrent.Future createEventTrackerAsync(final CreateEventTrackerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateEventTrackerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateEventTrackerResult call() throws Exception { CreateEventTrackerResult result = null; try { result = executeCreateEventTracker(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 createFilterAsync(CreateFilterRequest request) { return createFilterAsync(request, null); } @Override public java.util.concurrent.Future createFilterAsync(final CreateFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFilterResult call() throws Exception { CreateFilterResult result = null; try { result = executeCreateFilter(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 createMetricAttributionAsync(CreateMetricAttributionRequest request) { return createMetricAttributionAsync(request, null); } @Override public java.util.concurrent.Future createMetricAttributionAsync(final CreateMetricAttributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateMetricAttributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateMetricAttributionResult call() throws Exception { CreateMetricAttributionResult result = null; try { result = executeCreateMetricAttribution(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 createRecommenderAsync(CreateRecommenderRequest request) { return createRecommenderAsync(request, null); } @Override public java.util.concurrent.Future createRecommenderAsync(final CreateRecommenderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRecommenderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRecommenderResult call() throws Exception { CreateRecommenderResult result = null; try { result = executeCreateRecommender(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 createSchemaAsync(CreateSchemaRequest request) { return createSchemaAsync(request, null); } @Override public java.util.concurrent.Future createSchemaAsync(final CreateSchemaRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSchemaRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSchemaResult call() throws Exception { CreateSchemaResult result = null; try { result = executeCreateSchema(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 createSolutionAsync(CreateSolutionRequest request) { return createSolutionAsync(request, null); } @Override public java.util.concurrent.Future createSolutionAsync(final CreateSolutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSolutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSolutionResult call() throws Exception { CreateSolutionResult result = null; try { result = executeCreateSolution(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 createSolutionVersionAsync(CreateSolutionVersionRequest request) { return createSolutionVersionAsync(request, null); } @Override public java.util.concurrent.Future createSolutionVersionAsync(final CreateSolutionVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSolutionVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSolutionVersionResult call() throws Exception { CreateSolutionVersionResult result = null; try { result = executeCreateSolutionVersion(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 deleteCampaignAsync(DeleteCampaignRequest request) { return deleteCampaignAsync(request, null); } @Override public java.util.concurrent.Future deleteCampaignAsync(final DeleteCampaignRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCampaignRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCampaignResult call() throws Exception { DeleteCampaignResult result = null; try { result = executeDeleteCampaign(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 deleteDatasetAsync(DeleteDatasetRequest request) { return deleteDatasetAsync(request, null); } @Override public java.util.concurrent.Future deleteDatasetAsync(final DeleteDatasetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDatasetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDatasetResult call() throws Exception { DeleteDatasetResult result = null; try { result = executeDeleteDataset(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 deleteDatasetGroupAsync(DeleteDatasetGroupRequest request) { return deleteDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteDatasetGroupAsync(final DeleteDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDatasetGroupResult call() throws Exception { DeleteDatasetGroupResult result = null; try { result = executeDeleteDatasetGroup(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 deleteEventTrackerAsync(DeleteEventTrackerRequest request) { return deleteEventTrackerAsync(request, null); } @Override public java.util.concurrent.Future deleteEventTrackerAsync(final DeleteEventTrackerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEventTrackerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEventTrackerResult call() throws Exception { DeleteEventTrackerResult result = null; try { result = executeDeleteEventTracker(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 deleteFilterAsync(DeleteFilterRequest request) { return deleteFilterAsync(request, null); } @Override public java.util.concurrent.Future deleteFilterAsync(final DeleteFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFilterResult call() throws Exception { DeleteFilterResult result = null; try { result = executeDeleteFilter(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 deleteMetricAttributionAsync(DeleteMetricAttributionRequest request) { return deleteMetricAttributionAsync(request, null); } @Override public java.util.concurrent.Future deleteMetricAttributionAsync(final DeleteMetricAttributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMetricAttributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMetricAttributionResult call() throws Exception { DeleteMetricAttributionResult result = null; try { result = executeDeleteMetricAttribution(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 deleteRecommenderAsync(DeleteRecommenderRequest request) { return deleteRecommenderAsync(request, null); } @Override public java.util.concurrent.Future deleteRecommenderAsync(final DeleteRecommenderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRecommenderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRecommenderResult call() throws Exception { DeleteRecommenderResult result = null; try { result = executeDeleteRecommender(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 deleteSchemaAsync(DeleteSchemaRequest request) { return deleteSchemaAsync(request, null); } @Override public java.util.concurrent.Future deleteSchemaAsync(final DeleteSchemaRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSchemaRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSchemaResult call() throws Exception { DeleteSchemaResult result = null; try { result = executeDeleteSchema(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 deleteSolutionAsync(DeleteSolutionRequest request) { return deleteSolutionAsync(request, null); } @Override public java.util.concurrent.Future deleteSolutionAsync(final DeleteSolutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSolutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSolutionResult call() throws Exception { DeleteSolutionResult result = null; try { result = executeDeleteSolution(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 describeAlgorithmAsync(DescribeAlgorithmRequest request) { return describeAlgorithmAsync(request, null); } @Override public java.util.concurrent.Future describeAlgorithmAsync(final DescribeAlgorithmRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAlgorithmRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAlgorithmResult call() throws Exception { DescribeAlgorithmResult result = null; try { result = executeDescribeAlgorithm(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 describeBatchInferenceJobAsync(DescribeBatchInferenceJobRequest request) { return describeBatchInferenceJobAsync(request, null); } @Override public java.util.concurrent.Future describeBatchInferenceJobAsync(final DescribeBatchInferenceJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeBatchInferenceJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeBatchInferenceJobResult call() throws Exception { DescribeBatchInferenceJobResult result = null; try { result = executeDescribeBatchInferenceJob(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 describeBatchSegmentJobAsync(DescribeBatchSegmentJobRequest request) { return describeBatchSegmentJobAsync(request, null); } @Override public java.util.concurrent.Future describeBatchSegmentJobAsync(final DescribeBatchSegmentJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeBatchSegmentJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeBatchSegmentJobResult call() throws Exception { DescribeBatchSegmentJobResult result = null; try { result = executeDescribeBatchSegmentJob(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 describeCampaignAsync(DescribeCampaignRequest request) { return describeCampaignAsync(request, null); } @Override public java.util.concurrent.Future describeCampaignAsync(final DescribeCampaignRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCampaignRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCampaignResult call() throws Exception { DescribeCampaignResult result = null; try { result = executeDescribeCampaign(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 describeDataDeletionJobAsync(DescribeDataDeletionJobRequest request) { return describeDataDeletionJobAsync(request, null); } @Override public java.util.concurrent.Future describeDataDeletionJobAsync(final DescribeDataDeletionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDataDeletionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDataDeletionJobResult call() throws Exception { DescribeDataDeletionJobResult result = null; try { result = executeDescribeDataDeletionJob(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 describeDatasetAsync(DescribeDatasetRequest request) { return describeDatasetAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetAsync(final DescribeDatasetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetResult call() throws Exception { DescribeDatasetResult result = null; try { result = executeDescribeDataset(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 describeDatasetExportJobAsync(DescribeDatasetExportJobRequest request) { return describeDatasetExportJobAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetExportJobAsync(final DescribeDatasetExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetExportJobResult call() throws Exception { DescribeDatasetExportJobResult result = null; try { result = executeDescribeDatasetExportJob(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 describeDatasetGroupAsync(DescribeDatasetGroupRequest request) { return describeDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetGroupAsync(final DescribeDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetGroupResult call() throws Exception { DescribeDatasetGroupResult result = null; try { result = executeDescribeDatasetGroup(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 describeDatasetImportJobAsync(DescribeDatasetImportJobRequest request) { return describeDatasetImportJobAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetImportJobAsync(final DescribeDatasetImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetImportJobResult call() throws Exception { DescribeDatasetImportJobResult result = null; try { result = executeDescribeDatasetImportJob(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 describeEventTrackerAsync(DescribeEventTrackerRequest request) { return describeEventTrackerAsync(request, null); } @Override public java.util.concurrent.Future describeEventTrackerAsync(final DescribeEventTrackerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEventTrackerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEventTrackerResult call() throws Exception { DescribeEventTrackerResult result = null; try { result = executeDescribeEventTracker(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 describeFeatureTransformationAsync(DescribeFeatureTransformationRequest request) { return describeFeatureTransformationAsync(request, null); } @Override public java.util.concurrent.Future describeFeatureTransformationAsync( final DescribeFeatureTransformationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFeatureTransformationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFeatureTransformationResult call() throws Exception { DescribeFeatureTransformationResult result = null; try { result = executeDescribeFeatureTransformation(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 describeFilterAsync(DescribeFilterRequest request) { return describeFilterAsync(request, null); } @Override public java.util.concurrent.Future describeFilterAsync(final DescribeFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFilterResult call() throws Exception { DescribeFilterResult result = null; try { result = executeDescribeFilter(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 describeMetricAttributionAsync(DescribeMetricAttributionRequest request) { return describeMetricAttributionAsync(request, null); } @Override public java.util.concurrent.Future describeMetricAttributionAsync(final DescribeMetricAttributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeMetricAttributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeMetricAttributionResult call() throws Exception { DescribeMetricAttributionResult result = null; try { result = executeDescribeMetricAttribution(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 describeRecipeAsync(DescribeRecipeRequest request) { return describeRecipeAsync(request, null); } @Override public java.util.concurrent.Future describeRecipeAsync(final DescribeRecipeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRecipeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRecipeResult call() throws Exception { DescribeRecipeResult result = null; try { result = executeDescribeRecipe(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 describeRecommenderAsync(DescribeRecommenderRequest request) { return describeRecommenderAsync(request, null); } @Override public java.util.concurrent.Future describeRecommenderAsync(final DescribeRecommenderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRecommenderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRecommenderResult call() throws Exception { DescribeRecommenderResult result = null; try { result = executeDescribeRecommender(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 describeSchemaAsync(DescribeSchemaRequest request) { return describeSchemaAsync(request, null); } @Override public java.util.concurrent.Future describeSchemaAsync(final DescribeSchemaRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSchemaRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSchemaResult call() throws Exception { DescribeSchemaResult result = null; try { result = executeDescribeSchema(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 describeSolutionAsync(DescribeSolutionRequest request) { return describeSolutionAsync(request, null); } @Override public java.util.concurrent.Future describeSolutionAsync(final DescribeSolutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSolutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSolutionResult call() throws Exception { DescribeSolutionResult result = null; try { result = executeDescribeSolution(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 describeSolutionVersionAsync(DescribeSolutionVersionRequest request) { return describeSolutionVersionAsync(request, null); } @Override public java.util.concurrent.Future describeSolutionVersionAsync(final DescribeSolutionVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSolutionVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSolutionVersionResult call() throws Exception { DescribeSolutionVersionResult result = null; try { result = executeDescribeSolutionVersion(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 getSolutionMetricsAsync(GetSolutionMetricsRequest request) { return getSolutionMetricsAsync(request, null); } @Override public java.util.concurrent.Future getSolutionMetricsAsync(final GetSolutionMetricsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolutionMetricsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolutionMetricsResult call() throws Exception { GetSolutionMetricsResult result = null; try { result = executeGetSolutionMetrics(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 listBatchInferenceJobsAsync(ListBatchInferenceJobsRequest request) { return listBatchInferenceJobsAsync(request, null); } @Override public java.util.concurrent.Future listBatchInferenceJobsAsync(final ListBatchInferenceJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListBatchInferenceJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListBatchInferenceJobsResult call() throws Exception { ListBatchInferenceJobsResult result = null; try { result = executeListBatchInferenceJobs(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 listBatchSegmentJobsAsync(ListBatchSegmentJobsRequest request) { return listBatchSegmentJobsAsync(request, null); } @Override public java.util.concurrent.Future listBatchSegmentJobsAsync(final ListBatchSegmentJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListBatchSegmentJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListBatchSegmentJobsResult call() throws Exception { ListBatchSegmentJobsResult result = null; try { result = executeListBatchSegmentJobs(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 listCampaignsAsync(ListCampaignsRequest request) { return listCampaignsAsync(request, null); } @Override public java.util.concurrent.Future listCampaignsAsync(final ListCampaignsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCampaignsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCampaignsResult call() throws Exception { ListCampaignsResult result = null; try { result = executeListCampaigns(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 listDataDeletionJobsAsync(ListDataDeletionJobsRequest request) { return listDataDeletionJobsAsync(request, null); } @Override public java.util.concurrent.Future listDataDeletionJobsAsync(final ListDataDeletionJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDataDeletionJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDataDeletionJobsResult call() throws Exception { ListDataDeletionJobsResult result = null; try { result = executeListDataDeletionJobs(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 listDatasetExportJobsAsync(ListDatasetExportJobsRequest request) { return listDatasetExportJobsAsync(request, null); } @Override public java.util.concurrent.Future listDatasetExportJobsAsync(final ListDatasetExportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatasetExportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatasetExportJobsResult call() throws Exception { ListDatasetExportJobsResult result = null; try { result = executeListDatasetExportJobs(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 listDatasetGroupsAsync(ListDatasetGroupsRequest request) { return listDatasetGroupsAsync(request, null); } @Override public java.util.concurrent.Future listDatasetGroupsAsync(final ListDatasetGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatasetGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatasetGroupsResult call() throws Exception { ListDatasetGroupsResult result = null; try { result = executeListDatasetGroups(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 listDatasetImportJobsAsync(ListDatasetImportJobsRequest request) { return listDatasetImportJobsAsync(request, null); } @Override public java.util.concurrent.Future listDatasetImportJobsAsync(final ListDatasetImportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatasetImportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatasetImportJobsResult call() throws Exception { ListDatasetImportJobsResult result = null; try { result = executeListDatasetImportJobs(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 listDatasetsAsync(ListDatasetsRequest request) { return listDatasetsAsync(request, null); } @Override public java.util.concurrent.Future listDatasetsAsync(final ListDatasetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatasetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatasetsResult call() throws Exception { ListDatasetsResult result = null; try { result = executeListDatasets(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 listEventTrackersAsync(ListEventTrackersRequest request) { return listEventTrackersAsync(request, null); } @Override public java.util.concurrent.Future listEventTrackersAsync(final ListEventTrackersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEventTrackersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEventTrackersResult call() throws Exception { ListEventTrackersResult result = null; try { result = executeListEventTrackers(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 listFiltersAsync(ListFiltersRequest request) { return listFiltersAsync(request, null); } @Override public java.util.concurrent.Future listFiltersAsync(final ListFiltersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFiltersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFiltersResult call() throws Exception { ListFiltersResult result = null; try { result = executeListFilters(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 listMetricAttributionMetricsAsync(ListMetricAttributionMetricsRequest request) { return listMetricAttributionMetricsAsync(request, null); } @Override public java.util.concurrent.Future listMetricAttributionMetricsAsync(final ListMetricAttributionMetricsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMetricAttributionMetricsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMetricAttributionMetricsResult call() throws Exception { ListMetricAttributionMetricsResult result = null; try { result = executeListMetricAttributionMetrics(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 listMetricAttributionsAsync(ListMetricAttributionsRequest request) { return listMetricAttributionsAsync(request, null); } @Override public java.util.concurrent.Future listMetricAttributionsAsync(final ListMetricAttributionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMetricAttributionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMetricAttributionsResult call() throws Exception { ListMetricAttributionsResult result = null; try { result = executeListMetricAttributions(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 listRecipesAsync(ListRecipesRequest request) { return listRecipesAsync(request, null); } @Override public java.util.concurrent.Future listRecipesAsync(final ListRecipesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRecipesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRecipesResult call() throws Exception { ListRecipesResult result = null; try { result = executeListRecipes(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 listRecommendersAsync(ListRecommendersRequest request) { return listRecommendersAsync(request, null); } @Override public java.util.concurrent.Future listRecommendersAsync(final ListRecommendersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRecommendersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRecommendersResult call() throws Exception { ListRecommendersResult result = null; try { result = executeListRecommenders(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 listSchemasAsync(ListSchemasRequest request) { return listSchemasAsync(request, null); } @Override public java.util.concurrent.Future listSchemasAsync(final ListSchemasRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSchemasRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSchemasResult call() throws Exception { ListSchemasResult result = null; try { result = executeListSchemas(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 listSolutionVersionsAsync(ListSolutionVersionsRequest request) { return listSolutionVersionsAsync(request, null); } @Override public java.util.concurrent.Future listSolutionVersionsAsync(final ListSolutionVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolutionVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolutionVersionsResult call() throws Exception { ListSolutionVersionsResult result = null; try { result = executeListSolutionVersions(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 listSolutionsAsync(ListSolutionsRequest request) { return listSolutionsAsync(request, null); } @Override public java.util.concurrent.Future listSolutionsAsync(final ListSolutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolutionsResult call() throws Exception { ListSolutionsResult result = null; try { result = executeListSolutions(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 startRecommenderAsync(StartRecommenderRequest request) { return startRecommenderAsync(request, null); } @Override public java.util.concurrent.Future startRecommenderAsync(final StartRecommenderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartRecommenderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartRecommenderResult call() throws Exception { StartRecommenderResult result = null; try { result = executeStartRecommender(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 stopRecommenderAsync(StopRecommenderRequest request) { return stopRecommenderAsync(request, null); } @Override public java.util.concurrent.Future stopRecommenderAsync(final StopRecommenderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopRecommenderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopRecommenderResult call() throws Exception { StopRecommenderResult result = null; try { result = executeStopRecommender(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 stopSolutionVersionCreationAsync(StopSolutionVersionCreationRequest request) { return stopSolutionVersionCreationAsync(request, null); } @Override public java.util.concurrent.Future stopSolutionVersionCreationAsync(final StopSolutionVersionCreationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopSolutionVersionCreationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopSolutionVersionCreationResult call() throws Exception { StopSolutionVersionCreationResult result = null; try { result = executeStopSolutionVersionCreation(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 updateCampaignAsync(UpdateCampaignRequest request) { return updateCampaignAsync(request, null); } @Override public java.util.concurrent.Future updateCampaignAsync(final UpdateCampaignRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCampaignRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCampaignResult call() throws Exception { UpdateCampaignResult result = null; try { result = executeUpdateCampaign(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 updateDatasetAsync(UpdateDatasetRequest request) { return updateDatasetAsync(request, null); } @Override public java.util.concurrent.Future updateDatasetAsync(final UpdateDatasetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDatasetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDatasetResult call() throws Exception { UpdateDatasetResult result = null; try { result = executeUpdateDataset(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 updateMetricAttributionAsync(UpdateMetricAttributionRequest request) { return updateMetricAttributionAsync(request, null); } @Override public java.util.concurrent.Future updateMetricAttributionAsync(final UpdateMetricAttributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateMetricAttributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateMetricAttributionResult call() throws Exception { UpdateMetricAttributionResult result = null; try { result = executeUpdateMetricAttribution(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 updateRecommenderAsync(UpdateRecommenderRequest request) { return updateRecommenderAsync(request, null); } @Override public java.util.concurrent.Future updateRecommenderAsync(final UpdateRecommenderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRecommenderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRecommenderResult call() throws Exception { UpdateRecommenderResult result = null; try { result = executeUpdateRecommender(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