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

com.amazonaws.services.appsync.AWSAppSyncAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS AppSync module holds the client classes that are used for communicating with AWS AppSync 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.appsync;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

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

*

* AppSync provides API actions for creating and interacting with data sources using GraphQL from your application. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAppSyncAsyncClient extends AWSAppSyncClient implements AWSAppSyncAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSAppSyncAsyncClientBuilder asyncBuilder() { return AWSAppSyncAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWSAppSync using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSAppSyncAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWSAppSync using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSAppSyncAsyncClient(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 associateApiAsync(AssociateApiRequest request) { return associateApiAsync(request, null); } @Override public java.util.concurrent.Future associateApiAsync(final AssociateApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateApiResult call() throws Exception { AssociateApiResult result = null; try { result = executeAssociateApi(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 associateMergedGraphqlApiAsync(AssociateMergedGraphqlApiRequest request) { return associateMergedGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future associateMergedGraphqlApiAsync(final AssociateMergedGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateMergedGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateMergedGraphqlApiResult call() throws Exception { AssociateMergedGraphqlApiResult result = null; try { result = executeAssociateMergedGraphqlApi(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 associateSourceGraphqlApiAsync(AssociateSourceGraphqlApiRequest request) { return associateSourceGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future associateSourceGraphqlApiAsync(final AssociateSourceGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateSourceGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateSourceGraphqlApiResult call() throws Exception { AssociateSourceGraphqlApiResult result = null; try { result = executeAssociateSourceGraphqlApi(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 createApiCacheAsync(CreateApiCacheRequest request) { return createApiCacheAsync(request, null); } @Override public java.util.concurrent.Future createApiCacheAsync(final CreateApiCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateApiCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateApiCacheResult call() throws Exception { CreateApiCacheResult result = null; try { result = executeCreateApiCache(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 createApiKeyAsync(CreateApiKeyRequest request) { return createApiKeyAsync(request, null); } @Override public java.util.concurrent.Future createApiKeyAsync(final CreateApiKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateApiKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateApiKeyResult call() throws Exception { CreateApiKeyResult result = null; try { result = executeCreateApiKey(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 createDataSourceAsync(CreateDataSourceRequest request) { return createDataSourceAsync(request, null); } @Override public java.util.concurrent.Future createDataSourceAsync(final CreateDataSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDataSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDataSourceResult call() throws Exception { CreateDataSourceResult result = null; try { result = executeCreateDataSource(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 createDomainNameAsync(CreateDomainNameRequest request) { return createDomainNameAsync(request, null); } @Override public java.util.concurrent.Future createDomainNameAsync(final CreateDomainNameRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDomainNameRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDomainNameResult call() throws Exception { CreateDomainNameResult result = null; try { result = executeCreateDomainName(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 createFunctionAsync(CreateFunctionRequest request) { return createFunctionAsync(request, null); } @Override public java.util.concurrent.Future createFunctionAsync(final CreateFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFunctionResult call() throws Exception { CreateFunctionResult result = null; try { result = executeCreateFunction(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 createGraphqlApiAsync(CreateGraphqlApiRequest request) { return createGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future createGraphqlApiAsync(final CreateGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateGraphqlApiResult call() throws Exception { CreateGraphqlApiResult result = null; try { result = executeCreateGraphqlApi(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 createResolverAsync(CreateResolverRequest request) { return createResolverAsync(request, null); } @Override public java.util.concurrent.Future createResolverAsync(final CreateResolverRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateResolverRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateResolverResult call() throws Exception { CreateResolverResult result = null; try { result = executeCreateResolver(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 createTypeAsync(CreateTypeRequest request) { return createTypeAsync(request, null); } @Override public java.util.concurrent.Future createTypeAsync(final CreateTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTypeResult call() throws Exception { CreateTypeResult result = null; try { result = executeCreateType(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 deleteApiCacheAsync(DeleteApiCacheRequest request) { return deleteApiCacheAsync(request, null); } @Override public java.util.concurrent.Future deleteApiCacheAsync(final DeleteApiCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteApiCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteApiCacheResult call() throws Exception { DeleteApiCacheResult result = null; try { result = executeDeleteApiCache(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 deleteApiKeyAsync(DeleteApiKeyRequest request) { return deleteApiKeyAsync(request, null); } @Override public java.util.concurrent.Future deleteApiKeyAsync(final DeleteApiKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteApiKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteApiKeyResult call() throws Exception { DeleteApiKeyResult result = null; try { result = executeDeleteApiKey(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 deleteDataSourceAsync(DeleteDataSourceRequest request) { return deleteDataSourceAsync(request, null); } @Override public java.util.concurrent.Future deleteDataSourceAsync(final DeleteDataSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDataSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDataSourceResult call() throws Exception { DeleteDataSourceResult result = null; try { result = executeDeleteDataSource(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 deleteDomainNameAsync(DeleteDomainNameRequest request) { return deleteDomainNameAsync(request, null); } @Override public java.util.concurrent.Future deleteDomainNameAsync(final DeleteDomainNameRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDomainNameRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDomainNameResult call() throws Exception { DeleteDomainNameResult result = null; try { result = executeDeleteDomainName(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 deleteFunctionAsync(DeleteFunctionRequest request) { return deleteFunctionAsync(request, null); } @Override public java.util.concurrent.Future deleteFunctionAsync(final DeleteFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFunctionResult call() throws Exception { DeleteFunctionResult result = null; try { result = executeDeleteFunction(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 deleteGraphqlApiAsync(DeleteGraphqlApiRequest request) { return deleteGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future deleteGraphqlApiAsync(final DeleteGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteGraphqlApiResult call() throws Exception { DeleteGraphqlApiResult result = null; try { result = executeDeleteGraphqlApi(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 deleteResolverAsync(DeleteResolverRequest request) { return deleteResolverAsync(request, null); } @Override public java.util.concurrent.Future deleteResolverAsync(final DeleteResolverRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteResolverRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteResolverResult call() throws Exception { DeleteResolverResult result = null; try { result = executeDeleteResolver(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 deleteTypeAsync(DeleteTypeRequest request) { return deleteTypeAsync(request, null); } @Override public java.util.concurrent.Future deleteTypeAsync(final DeleteTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTypeResult call() throws Exception { DeleteTypeResult result = null; try { result = executeDeleteType(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 disassociateApiAsync(DisassociateApiRequest request) { return disassociateApiAsync(request, null); } @Override public java.util.concurrent.Future disassociateApiAsync(final DisassociateApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateApiResult call() throws Exception { DisassociateApiResult result = null; try { result = executeDisassociateApi(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 disassociateMergedGraphqlApiAsync(DisassociateMergedGraphqlApiRequest request) { return disassociateMergedGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future disassociateMergedGraphqlApiAsync(final DisassociateMergedGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateMergedGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateMergedGraphqlApiResult call() throws Exception { DisassociateMergedGraphqlApiResult result = null; try { result = executeDisassociateMergedGraphqlApi(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 disassociateSourceGraphqlApiAsync(DisassociateSourceGraphqlApiRequest request) { return disassociateSourceGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future disassociateSourceGraphqlApiAsync(final DisassociateSourceGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateSourceGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateSourceGraphqlApiResult call() throws Exception { DisassociateSourceGraphqlApiResult result = null; try { result = executeDisassociateSourceGraphqlApi(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 evaluateCodeAsync(EvaluateCodeRequest request) { return evaluateCodeAsync(request, null); } @Override public java.util.concurrent.Future evaluateCodeAsync(final EvaluateCodeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final EvaluateCodeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EvaluateCodeResult call() throws Exception { EvaluateCodeResult result = null; try { result = executeEvaluateCode(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 evaluateMappingTemplateAsync(EvaluateMappingTemplateRequest request) { return evaluateMappingTemplateAsync(request, null); } @Override public java.util.concurrent.Future evaluateMappingTemplateAsync(final EvaluateMappingTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final EvaluateMappingTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EvaluateMappingTemplateResult call() throws Exception { EvaluateMappingTemplateResult result = null; try { result = executeEvaluateMappingTemplate(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 flushApiCacheAsync(FlushApiCacheRequest request) { return flushApiCacheAsync(request, null); } @Override public java.util.concurrent.Future flushApiCacheAsync(final FlushApiCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final FlushApiCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public FlushApiCacheResult call() throws Exception { FlushApiCacheResult result = null; try { result = executeFlushApiCache(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 getApiAssociationAsync(GetApiAssociationRequest request) { return getApiAssociationAsync(request, null); } @Override public java.util.concurrent.Future getApiAssociationAsync(final GetApiAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetApiAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetApiAssociationResult call() throws Exception { GetApiAssociationResult result = null; try { result = executeGetApiAssociation(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 getApiCacheAsync(GetApiCacheRequest request) { return getApiCacheAsync(request, null); } @Override public java.util.concurrent.Future getApiCacheAsync(final GetApiCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetApiCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetApiCacheResult call() throws Exception { GetApiCacheResult result = null; try { result = executeGetApiCache(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 getDataSourceAsync(GetDataSourceRequest request) { return getDataSourceAsync(request, null); } @Override public java.util.concurrent.Future getDataSourceAsync(final GetDataSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDataSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDataSourceResult call() throws Exception { GetDataSourceResult result = null; try { result = executeGetDataSource(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 getDataSourceIntrospectionAsync(GetDataSourceIntrospectionRequest request) { return getDataSourceIntrospectionAsync(request, null); } @Override public java.util.concurrent.Future getDataSourceIntrospectionAsync(final GetDataSourceIntrospectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDataSourceIntrospectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDataSourceIntrospectionResult call() throws Exception { GetDataSourceIntrospectionResult result = null; try { result = executeGetDataSourceIntrospection(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 getDomainNameAsync(GetDomainNameRequest request) { return getDomainNameAsync(request, null); } @Override public java.util.concurrent.Future getDomainNameAsync(final GetDomainNameRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDomainNameRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDomainNameResult call() throws Exception { GetDomainNameResult result = null; try { result = executeGetDomainName(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 getFunctionAsync(GetFunctionRequest request) { return getFunctionAsync(request, null); } @Override public java.util.concurrent.Future getFunctionAsync(final GetFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFunctionResult call() throws Exception { GetFunctionResult result = null; try { result = executeGetFunction(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 getGraphqlApiAsync(GetGraphqlApiRequest request) { return getGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future getGraphqlApiAsync(final GetGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetGraphqlApiResult call() throws Exception { GetGraphqlApiResult result = null; try { result = executeGetGraphqlApi(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 getGraphqlApiEnvironmentVariablesAsync( GetGraphqlApiEnvironmentVariablesRequest request) { return getGraphqlApiEnvironmentVariablesAsync(request, null); } @Override public java.util.concurrent.Future getGraphqlApiEnvironmentVariablesAsync( final GetGraphqlApiEnvironmentVariablesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetGraphqlApiEnvironmentVariablesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetGraphqlApiEnvironmentVariablesResult call() throws Exception { GetGraphqlApiEnvironmentVariablesResult result = null; try { result = executeGetGraphqlApiEnvironmentVariables(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 getIntrospectionSchemaAsync(GetIntrospectionSchemaRequest request) { return getIntrospectionSchemaAsync(request, null); } @Override public java.util.concurrent.Future getIntrospectionSchemaAsync(final GetIntrospectionSchemaRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetIntrospectionSchemaRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetIntrospectionSchemaResult call() throws Exception { GetIntrospectionSchemaResult result = null; try { result = executeGetIntrospectionSchema(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 getResolverAsync(GetResolverRequest request) { return getResolverAsync(request, null); } @Override public java.util.concurrent.Future getResolverAsync(final GetResolverRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetResolverRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetResolverResult call() throws Exception { GetResolverResult result = null; try { result = executeGetResolver(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 getSchemaCreationStatusAsync(GetSchemaCreationStatusRequest request) { return getSchemaCreationStatusAsync(request, null); } @Override public java.util.concurrent.Future getSchemaCreationStatusAsync(final GetSchemaCreationStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSchemaCreationStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSchemaCreationStatusResult call() throws Exception { GetSchemaCreationStatusResult result = null; try { result = executeGetSchemaCreationStatus(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 getSourceApiAssociationAsync(GetSourceApiAssociationRequest request) { return getSourceApiAssociationAsync(request, null); } @Override public java.util.concurrent.Future getSourceApiAssociationAsync(final GetSourceApiAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSourceApiAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSourceApiAssociationResult call() throws Exception { GetSourceApiAssociationResult result = null; try { result = executeGetSourceApiAssociation(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 getTypeAsync(GetTypeRequest request) { return getTypeAsync(request, null); } @Override public java.util.concurrent.Future getTypeAsync(final GetTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTypeResult call() throws Exception { GetTypeResult result = null; try { result = executeGetType(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 listApiKeysAsync(ListApiKeysRequest request) { return listApiKeysAsync(request, null); } @Override public java.util.concurrent.Future listApiKeysAsync(final ListApiKeysRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListApiKeysRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListApiKeysResult call() throws Exception { ListApiKeysResult result = null; try { result = executeListApiKeys(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 listDataSourcesAsync(ListDataSourcesRequest request) { return listDataSourcesAsync(request, null); } @Override public java.util.concurrent.Future listDataSourcesAsync(final ListDataSourcesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDataSourcesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDataSourcesResult call() throws Exception { ListDataSourcesResult result = null; try { result = executeListDataSources(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 listDomainNamesAsync(ListDomainNamesRequest request) { return listDomainNamesAsync(request, null); } @Override public java.util.concurrent.Future listDomainNamesAsync(final ListDomainNamesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDomainNamesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDomainNamesResult call() throws Exception { ListDomainNamesResult result = null; try { result = executeListDomainNames(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 listFunctionsAsync(ListFunctionsRequest request) { return listFunctionsAsync(request, null); } @Override public java.util.concurrent.Future listFunctionsAsync(final ListFunctionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFunctionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFunctionsResult call() throws Exception { ListFunctionsResult result = null; try { result = executeListFunctions(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 listGraphqlApisAsync(ListGraphqlApisRequest request) { return listGraphqlApisAsync(request, null); } @Override public java.util.concurrent.Future listGraphqlApisAsync(final ListGraphqlApisRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListGraphqlApisRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListGraphqlApisResult call() throws Exception { ListGraphqlApisResult result = null; try { result = executeListGraphqlApis(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 listResolversAsync(ListResolversRequest request) { return listResolversAsync(request, null); } @Override public java.util.concurrent.Future listResolversAsync(final ListResolversRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListResolversRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListResolversResult call() throws Exception { ListResolversResult result = null; try { result = executeListResolvers(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 listResolversByFunctionAsync(ListResolversByFunctionRequest request) { return listResolversByFunctionAsync(request, null); } @Override public java.util.concurrent.Future listResolversByFunctionAsync(final ListResolversByFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListResolversByFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListResolversByFunctionResult call() throws Exception { ListResolversByFunctionResult result = null; try { result = executeListResolversByFunction(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 listSourceApiAssociationsAsync(ListSourceApiAssociationsRequest request) { return listSourceApiAssociationsAsync(request, null); } @Override public java.util.concurrent.Future listSourceApiAssociationsAsync(final ListSourceApiAssociationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSourceApiAssociationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSourceApiAssociationsResult call() throws Exception { ListSourceApiAssociationsResult result = null; try { result = executeListSourceApiAssociations(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 listTypesAsync(ListTypesRequest request) { return listTypesAsync(request, null); } @Override public java.util.concurrent.Future listTypesAsync(final ListTypesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTypesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTypesResult call() throws Exception { ListTypesResult result = null; try { result = executeListTypes(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 listTypesByAssociationAsync(ListTypesByAssociationRequest request) { return listTypesByAssociationAsync(request, null); } @Override public java.util.concurrent.Future listTypesByAssociationAsync(final ListTypesByAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTypesByAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTypesByAssociationResult call() throws Exception { ListTypesByAssociationResult result = null; try { result = executeListTypesByAssociation(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 putGraphqlApiEnvironmentVariablesAsync( PutGraphqlApiEnvironmentVariablesRequest request) { return putGraphqlApiEnvironmentVariablesAsync(request, null); } @Override public java.util.concurrent.Future putGraphqlApiEnvironmentVariablesAsync( final PutGraphqlApiEnvironmentVariablesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutGraphqlApiEnvironmentVariablesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutGraphqlApiEnvironmentVariablesResult call() throws Exception { PutGraphqlApiEnvironmentVariablesResult result = null; try { result = executePutGraphqlApiEnvironmentVariables(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 startDataSourceIntrospectionAsync(StartDataSourceIntrospectionRequest request) { return startDataSourceIntrospectionAsync(request, null); } @Override public java.util.concurrent.Future startDataSourceIntrospectionAsync(final StartDataSourceIntrospectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartDataSourceIntrospectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartDataSourceIntrospectionResult call() throws Exception { StartDataSourceIntrospectionResult result = null; try { result = executeStartDataSourceIntrospection(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 startSchemaCreationAsync(StartSchemaCreationRequest request) { return startSchemaCreationAsync(request, null); } @Override public java.util.concurrent.Future startSchemaCreationAsync(final StartSchemaCreationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartSchemaCreationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartSchemaCreationResult call() throws Exception { StartSchemaCreationResult result = null; try { result = executeStartSchemaCreation(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 startSchemaMergeAsync(StartSchemaMergeRequest request) { return startSchemaMergeAsync(request, null); } @Override public java.util.concurrent.Future startSchemaMergeAsync(final StartSchemaMergeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartSchemaMergeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartSchemaMergeResult call() throws Exception { StartSchemaMergeResult result = null; try { result = executeStartSchemaMerge(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 updateApiCacheAsync(UpdateApiCacheRequest request) { return updateApiCacheAsync(request, null); } @Override public java.util.concurrent.Future updateApiCacheAsync(final UpdateApiCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateApiCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateApiCacheResult call() throws Exception { UpdateApiCacheResult result = null; try { result = executeUpdateApiCache(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 updateApiKeyAsync(UpdateApiKeyRequest request) { return updateApiKeyAsync(request, null); } @Override public java.util.concurrent.Future updateApiKeyAsync(final UpdateApiKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateApiKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateApiKeyResult call() throws Exception { UpdateApiKeyResult result = null; try { result = executeUpdateApiKey(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 updateDataSourceAsync(UpdateDataSourceRequest request) { return updateDataSourceAsync(request, null); } @Override public java.util.concurrent.Future updateDataSourceAsync(final UpdateDataSourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDataSourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDataSourceResult call() throws Exception { UpdateDataSourceResult result = null; try { result = executeUpdateDataSource(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 updateDomainNameAsync(UpdateDomainNameRequest request) { return updateDomainNameAsync(request, null); } @Override public java.util.concurrent.Future updateDomainNameAsync(final UpdateDomainNameRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDomainNameRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDomainNameResult call() throws Exception { UpdateDomainNameResult result = null; try { result = executeUpdateDomainName(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 updateFunctionAsync(UpdateFunctionRequest request) { return updateFunctionAsync(request, null); } @Override public java.util.concurrent.Future updateFunctionAsync(final UpdateFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFunctionResult call() throws Exception { UpdateFunctionResult result = null; try { result = executeUpdateFunction(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 updateGraphqlApiAsync(UpdateGraphqlApiRequest request) { return updateGraphqlApiAsync(request, null); } @Override public java.util.concurrent.Future updateGraphqlApiAsync(final UpdateGraphqlApiRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateGraphqlApiRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateGraphqlApiResult call() throws Exception { UpdateGraphqlApiResult result = null; try { result = executeUpdateGraphqlApi(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 updateResolverAsync(UpdateResolverRequest request) { return updateResolverAsync(request, null); } @Override public java.util.concurrent.Future updateResolverAsync(final UpdateResolverRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateResolverRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateResolverResult call() throws Exception { UpdateResolverResult result = null; try { result = executeUpdateResolver(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 updateSourceApiAssociationAsync(UpdateSourceApiAssociationRequest request) { return updateSourceApiAssociationAsync(request, null); } @Override public java.util.concurrent.Future updateSourceApiAssociationAsync(final UpdateSourceApiAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSourceApiAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSourceApiAssociationResult call() throws Exception { UpdateSourceApiAssociationResult result = null; try { result = executeUpdateSourceApiAssociation(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 updateTypeAsync(UpdateTypeRequest request) { return updateTypeAsync(request, null); } @Override public java.util.concurrent.Future updateTypeAsync(final UpdateTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateTypeResult call() throws Exception { UpdateTypeResult result = null; try { result = executeUpdateType(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