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

com.amazonaws.services.tnb.AWSTnbAsyncClient Maven / Gradle / Ivy

Go to download

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

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

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

*

* Amazon Web Services Telco Network Builder (TNB) is a network automation service that helps you deploy and manage * telecom networks. AWS TNB helps you with the lifecycle management of your telecommunication network functions * throughout planning, deployment, and post-deployment activities. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSTnbAsyncClient extends AWSTnbClient implements AWSTnbAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSTnbAsyncClientBuilder asyncBuilder() { return AWSTnbAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS Telco Network Builder using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSTnbAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS Telco Network Builder using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSTnbAsyncClient(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 cancelSolNetworkOperationAsync(CancelSolNetworkOperationRequest request) { return cancelSolNetworkOperationAsync(request, null); } @Override public java.util.concurrent.Future cancelSolNetworkOperationAsync(final CancelSolNetworkOperationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelSolNetworkOperationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelSolNetworkOperationResult call() throws Exception { CancelSolNetworkOperationResult result = null; try { result = executeCancelSolNetworkOperation(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createSolFunctionPackageAsync(CreateSolFunctionPackageRequest request) { return createSolFunctionPackageAsync(request, null); } @Override public java.util.concurrent.Future createSolFunctionPackageAsync(final CreateSolFunctionPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSolFunctionPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSolFunctionPackageResult call() throws Exception { CreateSolFunctionPackageResult result = null; try { result = executeCreateSolFunctionPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createSolNetworkInstanceAsync(CreateSolNetworkInstanceRequest request) { return createSolNetworkInstanceAsync(request, null); } @Override public java.util.concurrent.Future createSolNetworkInstanceAsync(final CreateSolNetworkInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSolNetworkInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSolNetworkInstanceResult call() throws Exception { CreateSolNetworkInstanceResult result = null; try { result = executeCreateSolNetworkInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createSolNetworkPackageAsync(CreateSolNetworkPackageRequest request) { return createSolNetworkPackageAsync(request, null); } @Override public java.util.concurrent.Future createSolNetworkPackageAsync(final CreateSolNetworkPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSolNetworkPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSolNetworkPackageResult call() throws Exception { CreateSolNetworkPackageResult result = null; try { result = executeCreateSolNetworkPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteSolFunctionPackageAsync(DeleteSolFunctionPackageRequest request) { return deleteSolFunctionPackageAsync(request, null); } @Override public java.util.concurrent.Future deleteSolFunctionPackageAsync(final DeleteSolFunctionPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSolFunctionPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSolFunctionPackageResult call() throws Exception { DeleteSolFunctionPackageResult result = null; try { result = executeDeleteSolFunctionPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteSolNetworkInstanceAsync(DeleteSolNetworkInstanceRequest request) { return deleteSolNetworkInstanceAsync(request, null); } @Override public java.util.concurrent.Future deleteSolNetworkInstanceAsync(final DeleteSolNetworkInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSolNetworkInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSolNetworkInstanceResult call() throws Exception { DeleteSolNetworkInstanceResult result = null; try { result = executeDeleteSolNetworkInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteSolNetworkPackageAsync(DeleteSolNetworkPackageRequest request) { return deleteSolNetworkPackageAsync(request, null); } @Override public java.util.concurrent.Future deleteSolNetworkPackageAsync(final DeleteSolNetworkPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSolNetworkPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSolNetworkPackageResult call() throws Exception { DeleteSolNetworkPackageResult result = null; try { result = executeDeleteSolNetworkPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolFunctionInstanceAsync(GetSolFunctionInstanceRequest request) { return getSolFunctionInstanceAsync(request, null); } @Override public java.util.concurrent.Future getSolFunctionInstanceAsync(final GetSolFunctionInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolFunctionInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolFunctionInstanceResult call() throws Exception { GetSolFunctionInstanceResult result = null; try { result = executeGetSolFunctionInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolFunctionPackageAsync(GetSolFunctionPackageRequest request) { return getSolFunctionPackageAsync(request, null); } @Override public java.util.concurrent.Future getSolFunctionPackageAsync(final GetSolFunctionPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolFunctionPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolFunctionPackageResult call() throws Exception { GetSolFunctionPackageResult result = null; try { result = executeGetSolFunctionPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolFunctionPackageContentAsync(GetSolFunctionPackageContentRequest request) { return getSolFunctionPackageContentAsync(request, null); } @Override public java.util.concurrent.Future getSolFunctionPackageContentAsync(final GetSolFunctionPackageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolFunctionPackageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolFunctionPackageContentResult call() throws Exception { GetSolFunctionPackageContentResult result = null; try { result = executeGetSolFunctionPackageContent(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolFunctionPackageDescriptorAsync( GetSolFunctionPackageDescriptorRequest request) { return getSolFunctionPackageDescriptorAsync(request, null); } @Override public java.util.concurrent.Future getSolFunctionPackageDescriptorAsync( final GetSolFunctionPackageDescriptorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolFunctionPackageDescriptorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolFunctionPackageDescriptorResult call() throws Exception { GetSolFunctionPackageDescriptorResult result = null; try { result = executeGetSolFunctionPackageDescriptor(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolNetworkInstanceAsync(GetSolNetworkInstanceRequest request) { return getSolNetworkInstanceAsync(request, null); } @Override public java.util.concurrent.Future getSolNetworkInstanceAsync(final GetSolNetworkInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolNetworkInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolNetworkInstanceResult call() throws Exception { GetSolNetworkInstanceResult result = null; try { result = executeGetSolNetworkInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolNetworkOperationAsync(GetSolNetworkOperationRequest request) { return getSolNetworkOperationAsync(request, null); } @Override public java.util.concurrent.Future getSolNetworkOperationAsync(final GetSolNetworkOperationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolNetworkOperationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolNetworkOperationResult call() throws Exception { GetSolNetworkOperationResult result = null; try { result = executeGetSolNetworkOperation(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolNetworkPackageAsync(GetSolNetworkPackageRequest request) { return getSolNetworkPackageAsync(request, null); } @Override public java.util.concurrent.Future getSolNetworkPackageAsync(final GetSolNetworkPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolNetworkPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolNetworkPackageResult call() throws Exception { GetSolNetworkPackageResult result = null; try { result = executeGetSolNetworkPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolNetworkPackageContentAsync(GetSolNetworkPackageContentRequest request) { return getSolNetworkPackageContentAsync(request, null); } @Override public java.util.concurrent.Future getSolNetworkPackageContentAsync(final GetSolNetworkPackageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolNetworkPackageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolNetworkPackageContentResult call() throws Exception { GetSolNetworkPackageContentResult result = null; try { result = executeGetSolNetworkPackageContent(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getSolNetworkPackageDescriptorAsync(GetSolNetworkPackageDescriptorRequest request) { return getSolNetworkPackageDescriptorAsync(request, null); } @Override public java.util.concurrent.Future getSolNetworkPackageDescriptorAsync( final GetSolNetworkPackageDescriptorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSolNetworkPackageDescriptorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSolNetworkPackageDescriptorResult call() throws Exception { GetSolNetworkPackageDescriptorResult result = null; try { result = executeGetSolNetworkPackageDescriptor(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future instantiateSolNetworkInstanceAsync(InstantiateSolNetworkInstanceRequest request) { return instantiateSolNetworkInstanceAsync(request, null); } @Override public java.util.concurrent.Future instantiateSolNetworkInstanceAsync( final InstantiateSolNetworkInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final InstantiateSolNetworkInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public InstantiateSolNetworkInstanceResult call() throws Exception { InstantiateSolNetworkInstanceResult result = null; try { result = executeInstantiateSolNetworkInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listSolFunctionInstancesAsync(ListSolFunctionInstancesRequest request) { return listSolFunctionInstancesAsync(request, null); } @Override public java.util.concurrent.Future listSolFunctionInstancesAsync(final ListSolFunctionInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolFunctionInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolFunctionInstancesResult call() throws Exception { ListSolFunctionInstancesResult result = null; try { result = executeListSolFunctionInstances(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listSolFunctionPackagesAsync(ListSolFunctionPackagesRequest request) { return listSolFunctionPackagesAsync(request, null); } @Override public java.util.concurrent.Future listSolFunctionPackagesAsync(final ListSolFunctionPackagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolFunctionPackagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolFunctionPackagesResult call() throws Exception { ListSolFunctionPackagesResult result = null; try { result = executeListSolFunctionPackages(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listSolNetworkInstancesAsync(ListSolNetworkInstancesRequest request) { return listSolNetworkInstancesAsync(request, null); } @Override public java.util.concurrent.Future listSolNetworkInstancesAsync(final ListSolNetworkInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolNetworkInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolNetworkInstancesResult call() throws Exception { ListSolNetworkInstancesResult result = null; try { result = executeListSolNetworkInstances(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listSolNetworkOperationsAsync(ListSolNetworkOperationsRequest request) { return listSolNetworkOperationsAsync(request, null); } @Override public java.util.concurrent.Future listSolNetworkOperationsAsync(final ListSolNetworkOperationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolNetworkOperationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolNetworkOperationsResult call() throws Exception { ListSolNetworkOperationsResult result = null; try { result = executeListSolNetworkOperations(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listSolNetworkPackagesAsync(ListSolNetworkPackagesRequest request) { return listSolNetworkPackagesAsync(request, null); } @Override public java.util.concurrent.Future listSolNetworkPackagesAsync(final ListSolNetworkPackagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSolNetworkPackagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSolNetworkPackagesResult call() throws Exception { ListSolNetworkPackagesResult result = null; try { result = executeListSolNetworkPackages(finalRequest); } catch (Exception 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 putSolFunctionPackageContentAsync(PutSolFunctionPackageContentRequest request) { return putSolFunctionPackageContentAsync(request, null); } @Override public java.util.concurrent.Future putSolFunctionPackageContentAsync(final PutSolFunctionPackageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutSolFunctionPackageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutSolFunctionPackageContentResult call() throws Exception { PutSolFunctionPackageContentResult result = null; try { result = executePutSolFunctionPackageContent(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future putSolNetworkPackageContentAsync(PutSolNetworkPackageContentRequest request) { return putSolNetworkPackageContentAsync(request, null); } @Override public java.util.concurrent.Future putSolNetworkPackageContentAsync(final PutSolNetworkPackageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutSolNetworkPackageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutSolNetworkPackageContentResult call() throws Exception { PutSolNetworkPackageContentResult result = null; try { result = executePutSolNetworkPackageContent(finalRequest); } catch (Exception 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 terminateSolNetworkInstanceAsync(TerminateSolNetworkInstanceRequest request) { return terminateSolNetworkInstanceAsync(request, null); } @Override public java.util.concurrent.Future terminateSolNetworkInstanceAsync(final TerminateSolNetworkInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TerminateSolNetworkInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TerminateSolNetworkInstanceResult call() throws Exception { TerminateSolNetworkInstanceResult result = null; try { result = executeTerminateSolNetworkInstance(finalRequest); } catch (Exception 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 updateSolFunctionPackageAsync(UpdateSolFunctionPackageRequest request) { return updateSolFunctionPackageAsync(request, null); } @Override public java.util.concurrent.Future updateSolFunctionPackageAsync(final UpdateSolFunctionPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSolFunctionPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSolFunctionPackageResult call() throws Exception { UpdateSolFunctionPackageResult result = null; try { result = executeUpdateSolFunctionPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateSolNetworkInstanceAsync(UpdateSolNetworkInstanceRequest request) { return updateSolNetworkInstanceAsync(request, null); } @Override public java.util.concurrent.Future updateSolNetworkInstanceAsync(final UpdateSolNetworkInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSolNetworkInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSolNetworkInstanceResult call() throws Exception { UpdateSolNetworkInstanceResult result = null; try { result = executeUpdateSolNetworkInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateSolNetworkPackageAsync(UpdateSolNetworkPackageRequest request) { return updateSolNetworkPackageAsync(request, null); } @Override public java.util.concurrent.Future updateSolNetworkPackageAsync(final UpdateSolNetworkPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSolNetworkPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSolNetworkPackageResult call() throws Exception { UpdateSolNetworkPackageResult result = null; try { result = executeUpdateSolNetworkPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future validateSolFunctionPackageContentAsync( ValidateSolFunctionPackageContentRequest request) { return validateSolFunctionPackageContentAsync(request, null); } @Override public java.util.concurrent.Future validateSolFunctionPackageContentAsync( final ValidateSolFunctionPackageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ValidateSolFunctionPackageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ValidateSolFunctionPackageContentResult call() throws Exception { ValidateSolFunctionPackageContentResult result = null; try { result = executeValidateSolFunctionPackageContent(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future validateSolNetworkPackageContentAsync( ValidateSolNetworkPackageContentRequest request) { return validateSolNetworkPackageContentAsync(request, null); } @Override public java.util.concurrent.Future validateSolNetworkPackageContentAsync( final ValidateSolNetworkPackageContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ValidateSolNetworkPackageContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ValidateSolNetworkPackageContentResult call() throws Exception { ValidateSolNetworkPackageContentResult result = null; try { result = executeValidateSolNetworkPackageContent(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