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

com.amazonaws.services.amplifybackend.AWSAmplifyBackendAsyncClient Maven / Gradle / Ivy

Go to download

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

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

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

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

*

* AWS Amplify Admin API *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAmplifyBackendAsyncClient extends AWSAmplifyBackendClient implements AWSAmplifyBackendAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSAmplifyBackendAsyncClientBuilder asyncBuilder() { return AWSAmplifyBackendAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AmplifyBackend using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSAmplifyBackendAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AmplifyBackend using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSAmplifyBackendAsyncClient(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 cloneBackendAsync(CloneBackendRequest request) { return cloneBackendAsync(request, null); } @Override public java.util.concurrent.Future cloneBackendAsync(final CloneBackendRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CloneBackendRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CloneBackendResult call() throws Exception { CloneBackendResult result = null; try { result = executeCloneBackend(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBackendAsync(CreateBackendRequest request) { return createBackendAsync(request, null); } @Override public java.util.concurrent.Future createBackendAsync(final CreateBackendRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBackendRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBackendResult call() throws Exception { CreateBackendResult result = null; try { result = executeCreateBackend(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBackendAPIAsync(CreateBackendAPIRequest request) { return createBackendAPIAsync(request, null); } @Override public java.util.concurrent.Future createBackendAPIAsync(final CreateBackendAPIRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBackendAPIRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBackendAPIResult call() throws Exception { CreateBackendAPIResult result = null; try { result = executeCreateBackendAPI(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBackendAuthAsync(CreateBackendAuthRequest request) { return createBackendAuthAsync(request, null); } @Override public java.util.concurrent.Future createBackendAuthAsync(final CreateBackendAuthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBackendAuthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBackendAuthResult call() throws Exception { CreateBackendAuthResult result = null; try { result = executeCreateBackendAuth(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBackendConfigAsync(CreateBackendConfigRequest request) { return createBackendConfigAsync(request, null); } @Override public java.util.concurrent.Future createBackendConfigAsync(final CreateBackendConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBackendConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBackendConfigResult call() throws Exception { CreateBackendConfigResult result = null; try { result = executeCreateBackendConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBackendStorageAsync(CreateBackendStorageRequest request) { return createBackendStorageAsync(request, null); } @Override public java.util.concurrent.Future createBackendStorageAsync(final CreateBackendStorageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBackendStorageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBackendStorageResult call() throws Exception { CreateBackendStorageResult result = null; try { result = executeCreateBackendStorage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createTokenAsync(CreateTokenRequest request) { return createTokenAsync(request, null); } @Override public java.util.concurrent.Future createTokenAsync(final CreateTokenRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTokenRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTokenResult call() throws Exception { CreateTokenResult result = null; try { result = executeCreateToken(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteBackendAsync(DeleteBackendRequest request) { return deleteBackendAsync(request, null); } @Override public java.util.concurrent.Future deleteBackendAsync(final DeleteBackendRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBackendRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBackendResult call() throws Exception { DeleteBackendResult result = null; try { result = executeDeleteBackend(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteBackendAPIAsync(DeleteBackendAPIRequest request) { return deleteBackendAPIAsync(request, null); } @Override public java.util.concurrent.Future deleteBackendAPIAsync(final DeleteBackendAPIRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBackendAPIRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBackendAPIResult call() throws Exception { DeleteBackendAPIResult result = null; try { result = executeDeleteBackendAPI(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteBackendAuthAsync(DeleteBackendAuthRequest request) { return deleteBackendAuthAsync(request, null); } @Override public java.util.concurrent.Future deleteBackendAuthAsync(final DeleteBackendAuthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBackendAuthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBackendAuthResult call() throws Exception { DeleteBackendAuthResult result = null; try { result = executeDeleteBackendAuth(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteBackendStorageAsync(DeleteBackendStorageRequest request) { return deleteBackendStorageAsync(request, null); } @Override public java.util.concurrent.Future deleteBackendStorageAsync(final DeleteBackendStorageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBackendStorageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBackendStorageResult call() throws Exception { DeleteBackendStorageResult result = null; try { result = executeDeleteBackendStorage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteTokenAsync(DeleteTokenRequest request) { return deleteTokenAsync(request, null); } @Override public java.util.concurrent.Future deleteTokenAsync(final DeleteTokenRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTokenRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTokenResult call() throws Exception { DeleteTokenResult result = null; try { result = executeDeleteToken(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future generateBackendAPIModelsAsync(GenerateBackendAPIModelsRequest request) { return generateBackendAPIModelsAsync(request, null); } @Override public java.util.concurrent.Future generateBackendAPIModelsAsync(final GenerateBackendAPIModelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GenerateBackendAPIModelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GenerateBackendAPIModelsResult call() throws Exception { GenerateBackendAPIModelsResult result = null; try { result = executeGenerateBackendAPIModels(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getBackendAsync(GetBackendRequest request) { return getBackendAsync(request, null); } @Override public java.util.concurrent.Future getBackendAsync(final GetBackendRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBackendRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBackendResult call() throws Exception { GetBackendResult result = null; try { result = executeGetBackend(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getBackendAPIAsync(GetBackendAPIRequest request) { return getBackendAPIAsync(request, null); } @Override public java.util.concurrent.Future getBackendAPIAsync(final GetBackendAPIRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBackendAPIRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBackendAPIResult call() throws Exception { GetBackendAPIResult result = null; try { result = executeGetBackendAPI(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getBackendAPIModelsAsync(GetBackendAPIModelsRequest request) { return getBackendAPIModelsAsync(request, null); } @Override public java.util.concurrent.Future getBackendAPIModelsAsync(final GetBackendAPIModelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBackendAPIModelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBackendAPIModelsResult call() throws Exception { GetBackendAPIModelsResult result = null; try { result = executeGetBackendAPIModels(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getBackendAuthAsync(GetBackendAuthRequest request) { return getBackendAuthAsync(request, null); } @Override public java.util.concurrent.Future getBackendAuthAsync(final GetBackendAuthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBackendAuthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBackendAuthResult call() throws Exception { GetBackendAuthResult result = null; try { result = executeGetBackendAuth(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getBackendJobAsync(GetBackendJobRequest request) { return getBackendJobAsync(request, null); } @Override public java.util.concurrent.Future getBackendJobAsync(final GetBackendJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBackendJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBackendJobResult call() throws Exception { GetBackendJobResult result = null; try { result = executeGetBackendJob(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getBackendStorageAsync(GetBackendStorageRequest request) { return getBackendStorageAsync(request, null); } @Override public java.util.concurrent.Future getBackendStorageAsync(final GetBackendStorageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBackendStorageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBackendStorageResult call() throws Exception { GetBackendStorageResult result = null; try { result = executeGetBackendStorage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getTokenAsync(GetTokenRequest request) { return getTokenAsync(request, null); } @Override public java.util.concurrent.Future getTokenAsync(final GetTokenRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTokenRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTokenResult call() throws Exception { GetTokenResult result = null; try { result = executeGetToken(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future importBackendAuthAsync(ImportBackendAuthRequest request) { return importBackendAuthAsync(request, null); } @Override public java.util.concurrent.Future importBackendAuthAsync(final ImportBackendAuthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ImportBackendAuthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ImportBackendAuthResult call() throws Exception { ImportBackendAuthResult result = null; try { result = executeImportBackendAuth(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future importBackendStorageAsync(ImportBackendStorageRequest request) { return importBackendStorageAsync(request, null); } @Override public java.util.concurrent.Future importBackendStorageAsync(final ImportBackendStorageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ImportBackendStorageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ImportBackendStorageResult call() throws Exception { ImportBackendStorageResult result = null; try { result = executeImportBackendStorage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listBackendJobsAsync(ListBackendJobsRequest request) { return listBackendJobsAsync(request, null); } @Override public java.util.concurrent.Future listBackendJobsAsync(final ListBackendJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListBackendJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListBackendJobsResult call() throws Exception { ListBackendJobsResult result = null; try { result = executeListBackendJobs(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listS3BucketsAsync(ListS3BucketsRequest request) { return listS3BucketsAsync(request, null); } @Override public java.util.concurrent.Future listS3BucketsAsync(final ListS3BucketsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListS3BucketsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListS3BucketsResult call() throws Exception { ListS3BucketsResult result = null; try { result = executeListS3Buckets(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeAllBackendsAsync(RemoveAllBackendsRequest request) { return removeAllBackendsAsync(request, null); } @Override public java.util.concurrent.Future removeAllBackendsAsync(final RemoveAllBackendsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveAllBackendsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveAllBackendsResult call() throws Exception { RemoveAllBackendsResult result = null; try { result = executeRemoveAllBackends(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeBackendConfigAsync(RemoveBackendConfigRequest request) { return removeBackendConfigAsync(request, null); } @Override public java.util.concurrent.Future removeBackendConfigAsync(final RemoveBackendConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveBackendConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveBackendConfigResult call() throws Exception { RemoveBackendConfigResult result = null; try { result = executeRemoveBackendConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBackendAPIAsync(UpdateBackendAPIRequest request) { return updateBackendAPIAsync(request, null); } @Override public java.util.concurrent.Future updateBackendAPIAsync(final UpdateBackendAPIRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBackendAPIRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBackendAPIResult call() throws Exception { UpdateBackendAPIResult result = null; try { result = executeUpdateBackendAPI(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBackendAuthAsync(UpdateBackendAuthRequest request) { return updateBackendAuthAsync(request, null); } @Override public java.util.concurrent.Future updateBackendAuthAsync(final UpdateBackendAuthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBackendAuthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBackendAuthResult call() throws Exception { UpdateBackendAuthResult result = null; try { result = executeUpdateBackendAuth(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBackendConfigAsync(UpdateBackendConfigRequest request) { return updateBackendConfigAsync(request, null); } @Override public java.util.concurrent.Future updateBackendConfigAsync(final UpdateBackendConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBackendConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBackendConfigResult call() throws Exception { UpdateBackendConfigResult result = null; try { result = executeUpdateBackendConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBackendJobAsync(UpdateBackendJobRequest request) { return updateBackendJobAsync(request, null); } @Override public java.util.concurrent.Future updateBackendJobAsync(final UpdateBackendJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBackendJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBackendJobResult call() throws Exception { UpdateBackendJobResult result = null; try { result = executeUpdateBackendJob(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateBackendStorageAsync(UpdateBackendStorageRequest request) { return updateBackendStorageAsync(request, null); } @Override public java.util.concurrent.Future updateBackendStorageAsync(final UpdateBackendStorageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateBackendStorageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateBackendStorageResult call() throws Exception { UpdateBackendStorageResult result = null; try { result = executeUpdateBackendStorage(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