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

com.amazonaws.services.frauddetector.AmazonFraudDetectorAsyncClient Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.frauddetector;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Amazon Fraud Detector 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.
 * 

*

* This is the Amazon Fraud Detector API Reference. This guide is for developers who need detailed information about * Amazon Fraud Detector API actions, data types, and errors. For more information about Amazon Fraud Detector features, * see the Amazon Fraud Detector User Guide. *

*

* We provide the Query API as well as AWS software development kits (SDK) for Amazon Fraud Detector in Java and Python * programming languages. *

*

* The Amazon Fraud Detector Query API provides HTTPS requests that use the HTTP verb GET or POST and a Query parameter * Action. AWS SDK provides libraries, sample code, tutorials, and other resources for software developers * who prefer to build applications using language-specific APIs instead of submitting a request over HTTP or HTTPS. * These libraries provide basic functions that automatically take care of tasks such as cryptographically signing your * requests, retrying requests, and handling error responses, so that it is easier for you to get started. For more * information about the AWS SDKs, go to Tools to build on AWS * page, scroll down to the SDK section, and choose plus (+) sign to expand the section. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonFraudDetectorAsyncClient extends AmazonFraudDetectorClient implements AmazonFraudDetectorAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonFraudDetectorAsyncClientBuilder asyncBuilder() { return AmazonFraudDetectorAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Fraud Detector using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonFraudDetectorAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Fraud Detector using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonFraudDetectorAsyncClient(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 batchCreateVariableAsync(BatchCreateVariableRequest request) { return batchCreateVariableAsync(request, null); } @Override public java.util.concurrent.Future batchCreateVariableAsync(final BatchCreateVariableRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchCreateVariableRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchCreateVariableResult call() throws Exception { BatchCreateVariableResult result = null; try { result = executeBatchCreateVariable(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 batchGetVariableAsync(BatchGetVariableRequest request) { return batchGetVariableAsync(request, null); } @Override public java.util.concurrent.Future batchGetVariableAsync(final BatchGetVariableRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetVariableRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetVariableResult call() throws Exception { BatchGetVariableResult result = null; try { result = executeBatchGetVariable(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 cancelBatchImportJobAsync(CancelBatchImportJobRequest request) { return cancelBatchImportJobAsync(request, null); } @Override public java.util.concurrent.Future cancelBatchImportJobAsync(final CancelBatchImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelBatchImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelBatchImportJobResult call() throws Exception { CancelBatchImportJobResult result = null; try { result = executeCancelBatchImportJob(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 cancelBatchPredictionJobAsync(CancelBatchPredictionJobRequest request) { return cancelBatchPredictionJobAsync(request, null); } @Override public java.util.concurrent.Future cancelBatchPredictionJobAsync(final CancelBatchPredictionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelBatchPredictionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelBatchPredictionJobResult call() throws Exception { CancelBatchPredictionJobResult result = null; try { result = executeCancelBatchPredictionJob(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 createBatchImportJobAsync(CreateBatchImportJobRequest request) { return createBatchImportJobAsync(request, null); } @Override public java.util.concurrent.Future createBatchImportJobAsync(final CreateBatchImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBatchImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBatchImportJobResult call() throws Exception { CreateBatchImportJobResult result = null; try { result = executeCreateBatchImportJob(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 createBatchPredictionJobAsync(CreateBatchPredictionJobRequest request) { return createBatchPredictionJobAsync(request, null); } @Override public java.util.concurrent.Future createBatchPredictionJobAsync(final CreateBatchPredictionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBatchPredictionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBatchPredictionJobResult call() throws Exception { CreateBatchPredictionJobResult result = null; try { result = executeCreateBatchPredictionJob(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 createDetectorVersionAsync(CreateDetectorVersionRequest request) { return createDetectorVersionAsync(request, null); } @Override public java.util.concurrent.Future createDetectorVersionAsync(final CreateDetectorVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDetectorVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDetectorVersionResult call() throws Exception { CreateDetectorVersionResult result = null; try { result = executeCreateDetectorVersion(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 createListAsync(CreateListRequest request) { return createListAsync(request, null); } @Override public java.util.concurrent.Future createListAsync(final CreateListRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateListRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateListResult call() throws Exception { CreateListResult result = null; try { result = executeCreateList(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 createModelAsync(CreateModelRequest request) { return createModelAsync(request, null); } @Override public java.util.concurrent.Future createModelAsync(final CreateModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateModelResult call() throws Exception { CreateModelResult result = null; try { result = executeCreateModel(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 createModelVersionAsync(CreateModelVersionRequest request) { return createModelVersionAsync(request, null); } @Override public java.util.concurrent.Future createModelVersionAsync(final CreateModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateModelVersionResult call() throws Exception { CreateModelVersionResult result = null; try { result = executeCreateModelVersion(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 createRuleAsync(CreateRuleRequest request) { return createRuleAsync(request, null); } @Override public java.util.concurrent.Future createRuleAsync(final CreateRuleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRuleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRuleResult call() throws Exception { CreateRuleResult result = null; try { result = executeCreateRule(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 createVariableAsync(CreateVariableRequest request) { return createVariableAsync(request, null); } @Override public java.util.concurrent.Future createVariableAsync(final CreateVariableRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVariableRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVariableResult call() throws Exception { CreateVariableResult result = null; try { result = executeCreateVariable(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 deleteBatchImportJobAsync(DeleteBatchImportJobRequest request) { return deleteBatchImportJobAsync(request, null); } @Override public java.util.concurrent.Future deleteBatchImportJobAsync(final DeleteBatchImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBatchImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBatchImportJobResult call() throws Exception { DeleteBatchImportJobResult result = null; try { result = executeDeleteBatchImportJob(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 deleteBatchPredictionJobAsync(DeleteBatchPredictionJobRequest request) { return deleteBatchPredictionJobAsync(request, null); } @Override public java.util.concurrent.Future deleteBatchPredictionJobAsync(final DeleteBatchPredictionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBatchPredictionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBatchPredictionJobResult call() throws Exception { DeleteBatchPredictionJobResult result = null; try { result = executeDeleteBatchPredictionJob(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 deleteDetectorAsync(DeleteDetectorRequest request) { return deleteDetectorAsync(request, null); } @Override public java.util.concurrent.Future deleteDetectorAsync(final DeleteDetectorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDetectorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDetectorResult call() throws Exception { DeleteDetectorResult result = null; try { result = executeDeleteDetector(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 deleteDetectorVersionAsync(DeleteDetectorVersionRequest request) { return deleteDetectorVersionAsync(request, null); } @Override public java.util.concurrent.Future deleteDetectorVersionAsync(final DeleteDetectorVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDetectorVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDetectorVersionResult call() throws Exception { DeleteDetectorVersionResult result = null; try { result = executeDeleteDetectorVersion(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 deleteEntityTypeAsync(DeleteEntityTypeRequest request) { return deleteEntityTypeAsync(request, null); } @Override public java.util.concurrent.Future deleteEntityTypeAsync(final DeleteEntityTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEntityTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEntityTypeResult call() throws Exception { DeleteEntityTypeResult result = null; try { result = executeDeleteEntityType(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 deleteEventAsync(DeleteEventRequest request) { return deleteEventAsync(request, null); } @Override public java.util.concurrent.Future deleteEventAsync(final DeleteEventRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEventRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEventResult call() throws Exception { DeleteEventResult result = null; try { result = executeDeleteEvent(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 deleteEventTypeAsync(DeleteEventTypeRequest request) { return deleteEventTypeAsync(request, null); } @Override public java.util.concurrent.Future deleteEventTypeAsync(final DeleteEventTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEventTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEventTypeResult call() throws Exception { DeleteEventTypeResult result = null; try { result = executeDeleteEventType(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 deleteEventsByEventTypeAsync(DeleteEventsByEventTypeRequest request) { return deleteEventsByEventTypeAsync(request, null); } @Override public java.util.concurrent.Future deleteEventsByEventTypeAsync(final DeleteEventsByEventTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEventsByEventTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEventsByEventTypeResult call() throws Exception { DeleteEventsByEventTypeResult result = null; try { result = executeDeleteEventsByEventType(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 deleteExternalModelAsync(DeleteExternalModelRequest request) { return deleteExternalModelAsync(request, null); } @Override public java.util.concurrent.Future deleteExternalModelAsync(final DeleteExternalModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteExternalModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteExternalModelResult call() throws Exception { DeleteExternalModelResult result = null; try { result = executeDeleteExternalModel(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 deleteLabelAsync(DeleteLabelRequest request) { return deleteLabelAsync(request, null); } @Override public java.util.concurrent.Future deleteLabelAsync(final DeleteLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteLabelResult call() throws Exception { DeleteLabelResult result = null; try { result = executeDeleteLabel(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 deleteListAsync(DeleteListRequest request) { return deleteListAsync(request, null); } @Override public java.util.concurrent.Future deleteListAsync(final DeleteListRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteListRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteListResult call() throws Exception { DeleteListResult result = null; try { result = executeDeleteList(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 deleteModelAsync(DeleteModelRequest request) { return deleteModelAsync(request, null); } @Override public java.util.concurrent.Future deleteModelAsync(final DeleteModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteModelResult call() throws Exception { DeleteModelResult result = null; try { result = executeDeleteModel(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 deleteModelVersionAsync(DeleteModelVersionRequest request) { return deleteModelVersionAsync(request, null); } @Override public java.util.concurrent.Future deleteModelVersionAsync(final DeleteModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteModelVersionResult call() throws Exception { DeleteModelVersionResult result = null; try { result = executeDeleteModelVersion(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 deleteOutcomeAsync(DeleteOutcomeRequest request) { return deleteOutcomeAsync(request, null); } @Override public java.util.concurrent.Future deleteOutcomeAsync(final DeleteOutcomeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteOutcomeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteOutcomeResult call() throws Exception { DeleteOutcomeResult result = null; try { result = executeDeleteOutcome(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 deleteRuleAsync(DeleteRuleRequest request) { return deleteRuleAsync(request, null); } @Override public java.util.concurrent.Future deleteRuleAsync(final DeleteRuleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRuleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRuleResult call() throws Exception { DeleteRuleResult result = null; try { result = executeDeleteRule(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 deleteVariableAsync(DeleteVariableRequest request) { return deleteVariableAsync(request, null); } @Override public java.util.concurrent.Future deleteVariableAsync(final DeleteVariableRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVariableRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVariableResult call() throws Exception { DeleteVariableResult result = null; try { result = executeDeleteVariable(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 describeDetectorAsync(DescribeDetectorRequest request) { return describeDetectorAsync(request, null); } @Override public java.util.concurrent.Future describeDetectorAsync(final DescribeDetectorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDetectorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDetectorResult call() throws Exception { DescribeDetectorResult result = null; try { result = executeDescribeDetector(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 describeModelVersionsAsync(DescribeModelVersionsRequest request) { return describeModelVersionsAsync(request, null); } @Override public java.util.concurrent.Future describeModelVersionsAsync(final DescribeModelVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeModelVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeModelVersionsResult call() throws Exception { DescribeModelVersionsResult result = null; try { result = executeDescribeModelVersions(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 getBatchImportJobsAsync(GetBatchImportJobsRequest request) { return getBatchImportJobsAsync(request, null); } @Override public java.util.concurrent.Future getBatchImportJobsAsync(final GetBatchImportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBatchImportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBatchImportJobsResult call() throws Exception { GetBatchImportJobsResult result = null; try { result = executeGetBatchImportJobs(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 getBatchPredictionJobsAsync(GetBatchPredictionJobsRequest request) { return getBatchPredictionJobsAsync(request, null); } @Override public java.util.concurrent.Future getBatchPredictionJobsAsync(final GetBatchPredictionJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBatchPredictionJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBatchPredictionJobsResult call() throws Exception { GetBatchPredictionJobsResult result = null; try { result = executeGetBatchPredictionJobs(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 getDeleteEventsByEventTypeStatusAsync( GetDeleteEventsByEventTypeStatusRequest request) { return getDeleteEventsByEventTypeStatusAsync(request, null); } @Override public java.util.concurrent.Future getDeleteEventsByEventTypeStatusAsync( final GetDeleteEventsByEventTypeStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeleteEventsByEventTypeStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeleteEventsByEventTypeStatusResult call() throws Exception { GetDeleteEventsByEventTypeStatusResult result = null; try { result = executeGetDeleteEventsByEventTypeStatus(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 getDetectorVersionAsync(GetDetectorVersionRequest request) { return getDetectorVersionAsync(request, null); } @Override public java.util.concurrent.Future getDetectorVersionAsync(final GetDetectorVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDetectorVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDetectorVersionResult call() throws Exception { GetDetectorVersionResult result = null; try { result = executeGetDetectorVersion(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 getDetectorsAsync(GetDetectorsRequest request) { return getDetectorsAsync(request, null); } @Override public java.util.concurrent.Future getDetectorsAsync(final GetDetectorsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDetectorsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDetectorsResult call() throws Exception { GetDetectorsResult result = null; try { result = executeGetDetectors(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 getEntityTypesAsync(GetEntityTypesRequest request) { return getEntityTypesAsync(request, null); } @Override public java.util.concurrent.Future getEntityTypesAsync(final GetEntityTypesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEntityTypesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEntityTypesResult call() throws Exception { GetEntityTypesResult result = null; try { result = executeGetEntityTypes(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 getEventAsync(GetEventRequest request) { return getEventAsync(request, null); } @Override public java.util.concurrent.Future getEventAsync(final GetEventRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEventRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEventResult call() throws Exception { GetEventResult result = null; try { result = executeGetEvent(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 getEventPredictionAsync(GetEventPredictionRequest request) { return getEventPredictionAsync(request, null); } @Override public java.util.concurrent.Future getEventPredictionAsync(final GetEventPredictionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEventPredictionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEventPredictionResult call() throws Exception { GetEventPredictionResult result = null; try { result = executeGetEventPrediction(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 getEventPredictionMetadataAsync(GetEventPredictionMetadataRequest request) { return getEventPredictionMetadataAsync(request, null); } @Override public java.util.concurrent.Future getEventPredictionMetadataAsync(final GetEventPredictionMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEventPredictionMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEventPredictionMetadataResult call() throws Exception { GetEventPredictionMetadataResult result = null; try { result = executeGetEventPredictionMetadata(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 getEventTypesAsync(GetEventTypesRequest request) { return getEventTypesAsync(request, null); } @Override public java.util.concurrent.Future getEventTypesAsync(final GetEventTypesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEventTypesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEventTypesResult call() throws Exception { GetEventTypesResult result = null; try { result = executeGetEventTypes(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 getExternalModelsAsync(GetExternalModelsRequest request) { return getExternalModelsAsync(request, null); } @Override public java.util.concurrent.Future getExternalModelsAsync(final GetExternalModelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetExternalModelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetExternalModelsResult call() throws Exception { GetExternalModelsResult result = null; try { result = executeGetExternalModels(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 getKMSEncryptionKeyAsync(GetKMSEncryptionKeyRequest request) { return getKMSEncryptionKeyAsync(request, null); } @Override public java.util.concurrent.Future getKMSEncryptionKeyAsync(final GetKMSEncryptionKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetKMSEncryptionKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetKMSEncryptionKeyResult call() throws Exception { GetKMSEncryptionKeyResult result = null; try { result = executeGetKMSEncryptionKey(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 getLabelsAsync(GetLabelsRequest request) { return getLabelsAsync(request, null); } @Override public java.util.concurrent.Future getLabelsAsync(final GetLabelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetLabelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetLabelsResult call() throws Exception { GetLabelsResult result = null; try { result = executeGetLabels(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 getListElementsAsync(GetListElementsRequest request) { return getListElementsAsync(request, null); } @Override public java.util.concurrent.Future getListElementsAsync(final GetListElementsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetListElementsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetListElementsResult call() throws Exception { GetListElementsResult result = null; try { result = executeGetListElements(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 getListsMetadataAsync(GetListsMetadataRequest request) { return getListsMetadataAsync(request, null); } @Override public java.util.concurrent.Future getListsMetadataAsync(final GetListsMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetListsMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetListsMetadataResult call() throws Exception { GetListsMetadataResult result = null; try { result = executeGetListsMetadata(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 getModelVersionAsync(GetModelVersionRequest request) { return getModelVersionAsync(request, null); } @Override public java.util.concurrent.Future getModelVersionAsync(final GetModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetModelVersionResult call() throws Exception { GetModelVersionResult result = null; try { result = executeGetModelVersion(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 getModelsAsync(GetModelsRequest request) { return getModelsAsync(request, null); } @Override public java.util.concurrent.Future getModelsAsync(final GetModelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetModelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetModelsResult call() throws Exception { GetModelsResult result = null; try { result = executeGetModels(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 getOutcomesAsync(GetOutcomesRequest request) { return getOutcomesAsync(request, null); } @Override public java.util.concurrent.Future getOutcomesAsync(final GetOutcomesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetOutcomesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetOutcomesResult call() throws Exception { GetOutcomesResult result = null; try { result = executeGetOutcomes(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 getRulesAsync(GetRulesRequest request) { return getRulesAsync(request, null); } @Override public java.util.concurrent.Future getRulesAsync(final GetRulesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRulesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRulesResult call() throws Exception { GetRulesResult result = null; try { result = executeGetRules(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 getVariablesAsync(GetVariablesRequest request) { return getVariablesAsync(request, null); } @Override public java.util.concurrent.Future getVariablesAsync(final GetVariablesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetVariablesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetVariablesResult call() throws Exception { GetVariablesResult result = null; try { result = executeGetVariables(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 listEventPredictionsAsync(ListEventPredictionsRequest request) { return listEventPredictionsAsync(request, null); } @Override public java.util.concurrent.Future listEventPredictionsAsync(final ListEventPredictionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEventPredictionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEventPredictionsResult call() throws Exception { ListEventPredictionsResult result = null; try { result = executeListEventPredictions(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 putDetectorAsync(PutDetectorRequest request) { return putDetectorAsync(request, null); } @Override public java.util.concurrent.Future putDetectorAsync(final PutDetectorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutDetectorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutDetectorResult call() throws Exception { PutDetectorResult result = null; try { result = executePutDetector(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 putEntityTypeAsync(PutEntityTypeRequest request) { return putEntityTypeAsync(request, null); } @Override public java.util.concurrent.Future putEntityTypeAsync(final PutEntityTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutEntityTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutEntityTypeResult call() throws Exception { PutEntityTypeResult result = null; try { result = executePutEntityType(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 putEventTypeAsync(PutEventTypeRequest request) { return putEventTypeAsync(request, null); } @Override public java.util.concurrent.Future putEventTypeAsync(final PutEventTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutEventTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutEventTypeResult call() throws Exception { PutEventTypeResult result = null; try { result = executePutEventType(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 putExternalModelAsync(PutExternalModelRequest request) { return putExternalModelAsync(request, null); } @Override public java.util.concurrent.Future putExternalModelAsync(final PutExternalModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutExternalModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutExternalModelResult call() throws Exception { PutExternalModelResult result = null; try { result = executePutExternalModel(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 putKMSEncryptionKeyAsync(PutKMSEncryptionKeyRequest request) { return putKMSEncryptionKeyAsync(request, null); } @Override public java.util.concurrent.Future putKMSEncryptionKeyAsync(final PutKMSEncryptionKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutKMSEncryptionKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutKMSEncryptionKeyResult call() throws Exception { PutKMSEncryptionKeyResult result = null; try { result = executePutKMSEncryptionKey(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 putLabelAsync(PutLabelRequest request) { return putLabelAsync(request, null); } @Override public java.util.concurrent.Future putLabelAsync(final PutLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutLabelResult call() throws Exception { PutLabelResult result = null; try { result = executePutLabel(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 putOutcomeAsync(PutOutcomeRequest request) { return putOutcomeAsync(request, null); } @Override public java.util.concurrent.Future putOutcomeAsync(final PutOutcomeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutOutcomeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutOutcomeResult call() throws Exception { PutOutcomeResult result = null; try { result = executePutOutcome(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 sendEventAsync(SendEventRequest request) { return sendEventAsync(request, null); } @Override public java.util.concurrent.Future sendEventAsync(final SendEventRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SendEventRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SendEventResult call() throws Exception { SendEventResult result = null; try { result = executeSendEvent(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 updateDetectorVersionAsync(UpdateDetectorVersionRequest request) { return updateDetectorVersionAsync(request, null); } @Override public java.util.concurrent.Future updateDetectorVersionAsync(final UpdateDetectorVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDetectorVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDetectorVersionResult call() throws Exception { UpdateDetectorVersionResult result = null; try { result = executeUpdateDetectorVersion(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 updateDetectorVersionMetadataAsync(UpdateDetectorVersionMetadataRequest request) { return updateDetectorVersionMetadataAsync(request, null); } @Override public java.util.concurrent.Future updateDetectorVersionMetadataAsync( final UpdateDetectorVersionMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDetectorVersionMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDetectorVersionMetadataResult call() throws Exception { UpdateDetectorVersionMetadataResult result = null; try { result = executeUpdateDetectorVersionMetadata(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 updateDetectorVersionStatusAsync(UpdateDetectorVersionStatusRequest request) { return updateDetectorVersionStatusAsync(request, null); } @Override public java.util.concurrent.Future updateDetectorVersionStatusAsync(final UpdateDetectorVersionStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDetectorVersionStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDetectorVersionStatusResult call() throws Exception { UpdateDetectorVersionStatusResult result = null; try { result = executeUpdateDetectorVersionStatus(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 updateEventLabelAsync(UpdateEventLabelRequest request) { return updateEventLabelAsync(request, null); } @Override public java.util.concurrent.Future updateEventLabelAsync(final UpdateEventLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateEventLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateEventLabelResult call() throws Exception { UpdateEventLabelResult result = null; try { result = executeUpdateEventLabel(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 updateListAsync(UpdateListRequest request) { return updateListAsync(request, null); } @Override public java.util.concurrent.Future updateListAsync(final UpdateListRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateListRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateListResult call() throws Exception { UpdateListResult result = null; try { result = executeUpdateList(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 updateModelAsync(UpdateModelRequest request) { return updateModelAsync(request, null); } @Override public java.util.concurrent.Future updateModelAsync(final UpdateModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateModelResult call() throws Exception { UpdateModelResult result = null; try { result = executeUpdateModel(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 updateModelVersionAsync(UpdateModelVersionRequest request) { return updateModelVersionAsync(request, null); } @Override public java.util.concurrent.Future updateModelVersionAsync(final UpdateModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateModelVersionResult call() throws Exception { UpdateModelVersionResult result = null; try { result = executeUpdateModelVersion(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 updateModelVersionStatusAsync(UpdateModelVersionStatusRequest request) { return updateModelVersionStatusAsync(request, null); } @Override public java.util.concurrent.Future updateModelVersionStatusAsync(final UpdateModelVersionStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateModelVersionStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateModelVersionStatusResult call() throws Exception { UpdateModelVersionStatusResult result = null; try { result = executeUpdateModelVersionStatus(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 updateRuleMetadataAsync(UpdateRuleMetadataRequest request) { return updateRuleMetadataAsync(request, null); } @Override public java.util.concurrent.Future updateRuleMetadataAsync(final UpdateRuleMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRuleMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRuleMetadataResult call() throws Exception { UpdateRuleMetadataResult result = null; try { result = executeUpdateRuleMetadata(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 updateRuleVersionAsync(UpdateRuleVersionRequest request) { return updateRuleVersionAsync(request, null); } @Override public java.util.concurrent.Future updateRuleVersionAsync(final UpdateRuleVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRuleVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRuleVersionResult call() throws Exception { UpdateRuleVersionResult result = null; try { result = executeUpdateRuleVersion(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 updateVariableAsync(UpdateVariableRequest request) { return updateVariableAsync(request, null); } @Override public java.util.concurrent.Future updateVariableAsync(final UpdateVariableRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVariableRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVariableResult call() throws Exception { UpdateVariableResult result = null; try { result = executeUpdateVariable(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