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

com.amazonaws.services.appmesh.AWSAppMeshAsyncClient Maven / Gradle / Ivy

Go to download

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

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS App Mesh 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.
 * 

*

* App Mesh is a service mesh based on the Envoy proxy that makes it easy to monitor and control microservices. App Mesh * standardizes how your microservices communicate, giving you end-to-end visibility and helping to ensure high * availability for your applications. *

*

* App Mesh gives you consistent visibility and network traffic controls for every microservice in an application. You * can use App Mesh with Amazon Web Services Fargate, Amazon ECS, Amazon EKS, Kubernetes on Amazon Web Services, and * Amazon EC2. *

* *

* App Mesh supports microservice applications that use service discovery naming for their components. For more * information about service discovery on Amazon ECS, see Service Discovery in * the Amazon Elastic Container Service Developer Guide. Kubernetes kube-dns and * coredns are supported. For more information, see DNS for Services and Pods in the * Kubernetes documentation. *

*
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAppMeshAsyncClient extends AWSAppMeshClient implements AWSAppMeshAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSAppMeshAsyncClientBuilder asyncBuilder() { return AWSAppMeshAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS App Mesh using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSAppMeshAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS App Mesh using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSAppMeshAsyncClient(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 createGatewayRouteAsync(CreateGatewayRouteRequest request) { return createGatewayRouteAsync(request, null); } @Override public java.util.concurrent.Future createGatewayRouteAsync(final CreateGatewayRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateGatewayRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateGatewayRouteResult call() throws Exception { CreateGatewayRouteResult result = null; try { result = executeCreateGatewayRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createMeshAsync(CreateMeshRequest request) { return createMeshAsync(request, null); } @Override public java.util.concurrent.Future createMeshAsync(final CreateMeshRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateMeshRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateMeshResult call() throws Exception { CreateMeshResult result = null; try { result = executeCreateMesh(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createRouteAsync(CreateRouteRequest request) { return createRouteAsync(request, null); } @Override public java.util.concurrent.Future createRouteAsync(final CreateRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRouteResult call() throws Exception { CreateRouteResult result = null; try { result = executeCreateRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVirtualGatewayAsync(CreateVirtualGatewayRequest request) { return createVirtualGatewayAsync(request, null); } @Override public java.util.concurrent.Future createVirtualGatewayAsync(final CreateVirtualGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVirtualGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVirtualGatewayResult call() throws Exception { CreateVirtualGatewayResult result = null; try { result = executeCreateVirtualGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVirtualNodeAsync(CreateVirtualNodeRequest request) { return createVirtualNodeAsync(request, null); } @Override public java.util.concurrent.Future createVirtualNodeAsync(final CreateVirtualNodeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVirtualNodeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVirtualNodeResult call() throws Exception { CreateVirtualNodeResult result = null; try { result = executeCreateVirtualNode(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVirtualRouterAsync(CreateVirtualRouterRequest request) { return createVirtualRouterAsync(request, null); } @Override public java.util.concurrent.Future createVirtualRouterAsync(final CreateVirtualRouterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVirtualRouterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVirtualRouterResult call() throws Exception { CreateVirtualRouterResult result = null; try { result = executeCreateVirtualRouter(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVirtualServiceAsync(CreateVirtualServiceRequest request) { return createVirtualServiceAsync(request, null); } @Override public java.util.concurrent.Future createVirtualServiceAsync(final CreateVirtualServiceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVirtualServiceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVirtualServiceResult call() throws Exception { CreateVirtualServiceResult result = null; try { result = executeCreateVirtualService(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteGatewayRouteAsync(DeleteGatewayRouteRequest request) { return deleteGatewayRouteAsync(request, null); } @Override public java.util.concurrent.Future deleteGatewayRouteAsync(final DeleteGatewayRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteGatewayRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteGatewayRouteResult call() throws Exception { DeleteGatewayRouteResult result = null; try { result = executeDeleteGatewayRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteMeshAsync(DeleteMeshRequest request) { return deleteMeshAsync(request, null); } @Override public java.util.concurrent.Future deleteMeshAsync(final DeleteMeshRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMeshRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMeshResult call() throws Exception { DeleteMeshResult result = null; try { result = executeDeleteMesh(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteRouteAsync(DeleteRouteRequest request) { return deleteRouteAsync(request, null); } @Override public java.util.concurrent.Future deleteRouteAsync(final DeleteRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRouteResult call() throws Exception { DeleteRouteResult result = null; try { result = executeDeleteRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteVirtualGatewayAsync(DeleteVirtualGatewayRequest request) { return deleteVirtualGatewayAsync(request, null); } @Override public java.util.concurrent.Future deleteVirtualGatewayAsync(final DeleteVirtualGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVirtualGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVirtualGatewayResult call() throws Exception { DeleteVirtualGatewayResult result = null; try { result = executeDeleteVirtualGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteVirtualNodeAsync(DeleteVirtualNodeRequest request) { return deleteVirtualNodeAsync(request, null); } @Override public java.util.concurrent.Future deleteVirtualNodeAsync(final DeleteVirtualNodeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVirtualNodeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVirtualNodeResult call() throws Exception { DeleteVirtualNodeResult result = null; try { result = executeDeleteVirtualNode(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteVirtualRouterAsync(DeleteVirtualRouterRequest request) { return deleteVirtualRouterAsync(request, null); } @Override public java.util.concurrent.Future deleteVirtualRouterAsync(final DeleteVirtualRouterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVirtualRouterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVirtualRouterResult call() throws Exception { DeleteVirtualRouterResult result = null; try { result = executeDeleteVirtualRouter(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteVirtualServiceAsync(DeleteVirtualServiceRequest request) { return deleteVirtualServiceAsync(request, null); } @Override public java.util.concurrent.Future deleteVirtualServiceAsync(final DeleteVirtualServiceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVirtualServiceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVirtualServiceResult call() throws Exception { DeleteVirtualServiceResult result = null; try { result = executeDeleteVirtualService(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeGatewayRouteAsync(DescribeGatewayRouteRequest request) { return describeGatewayRouteAsync(request, null); } @Override public java.util.concurrent.Future describeGatewayRouteAsync(final DescribeGatewayRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeGatewayRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeGatewayRouteResult call() throws Exception { DescribeGatewayRouteResult result = null; try { result = executeDescribeGatewayRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeMeshAsync(DescribeMeshRequest request) { return describeMeshAsync(request, null); } @Override public java.util.concurrent.Future describeMeshAsync(final DescribeMeshRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeMeshRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeMeshResult call() throws Exception { DescribeMeshResult result = null; try { result = executeDescribeMesh(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeRouteAsync(DescribeRouteRequest request) { return describeRouteAsync(request, null); } @Override public java.util.concurrent.Future describeRouteAsync(final DescribeRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRouteResult call() throws Exception { DescribeRouteResult result = null; try { result = executeDescribeRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeVirtualGatewayAsync(DescribeVirtualGatewayRequest request) { return describeVirtualGatewayAsync(request, null); } @Override public java.util.concurrent.Future describeVirtualGatewayAsync(final DescribeVirtualGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeVirtualGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeVirtualGatewayResult call() throws Exception { DescribeVirtualGatewayResult result = null; try { result = executeDescribeVirtualGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeVirtualNodeAsync(DescribeVirtualNodeRequest request) { return describeVirtualNodeAsync(request, null); } @Override public java.util.concurrent.Future describeVirtualNodeAsync(final DescribeVirtualNodeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeVirtualNodeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeVirtualNodeResult call() throws Exception { DescribeVirtualNodeResult result = null; try { result = executeDescribeVirtualNode(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeVirtualRouterAsync(DescribeVirtualRouterRequest request) { return describeVirtualRouterAsync(request, null); } @Override public java.util.concurrent.Future describeVirtualRouterAsync(final DescribeVirtualRouterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeVirtualRouterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeVirtualRouterResult call() throws Exception { DescribeVirtualRouterResult result = null; try { result = executeDescribeVirtualRouter(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeVirtualServiceAsync(DescribeVirtualServiceRequest request) { return describeVirtualServiceAsync(request, null); } @Override public java.util.concurrent.Future describeVirtualServiceAsync(final DescribeVirtualServiceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeVirtualServiceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeVirtualServiceResult call() throws Exception { DescribeVirtualServiceResult result = null; try { result = executeDescribeVirtualService(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listGatewayRoutesAsync(ListGatewayRoutesRequest request) { return listGatewayRoutesAsync(request, null); } @Override public java.util.concurrent.Future listGatewayRoutesAsync(final ListGatewayRoutesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListGatewayRoutesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListGatewayRoutesResult call() throws Exception { ListGatewayRoutesResult result = null; try { result = executeListGatewayRoutes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listMeshesAsync(ListMeshesRequest request) { return listMeshesAsync(request, null); } @Override public java.util.concurrent.Future listMeshesAsync(final ListMeshesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMeshesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMeshesResult call() throws Exception { ListMeshesResult result = null; try { result = executeListMeshes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listRoutesAsync(ListRoutesRequest request) { return listRoutesAsync(request, null); } @Override public java.util.concurrent.Future listRoutesAsync(final ListRoutesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRoutesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRoutesResult call() throws Exception { ListRoutesResult result = null; try { result = executeListRoutes(finalRequest); } catch (Exception 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 listVirtualGatewaysAsync(ListVirtualGatewaysRequest request) { return listVirtualGatewaysAsync(request, null); } @Override public java.util.concurrent.Future listVirtualGatewaysAsync(final ListVirtualGatewaysRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVirtualGatewaysRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVirtualGatewaysResult call() throws Exception { ListVirtualGatewaysResult result = null; try { result = executeListVirtualGateways(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listVirtualNodesAsync(ListVirtualNodesRequest request) { return listVirtualNodesAsync(request, null); } @Override public java.util.concurrent.Future listVirtualNodesAsync(final ListVirtualNodesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVirtualNodesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVirtualNodesResult call() throws Exception { ListVirtualNodesResult result = null; try { result = executeListVirtualNodes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listVirtualRoutersAsync(ListVirtualRoutersRequest request) { return listVirtualRoutersAsync(request, null); } @Override public java.util.concurrent.Future listVirtualRoutersAsync(final ListVirtualRoutersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVirtualRoutersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVirtualRoutersResult call() throws Exception { ListVirtualRoutersResult result = null; try { result = executeListVirtualRouters(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listVirtualServicesAsync(ListVirtualServicesRequest request) { return listVirtualServicesAsync(request, null); } @Override public java.util.concurrent.Future listVirtualServicesAsync(final ListVirtualServicesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVirtualServicesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVirtualServicesResult call() throws Exception { ListVirtualServicesResult result = null; try { result = executeListVirtualServices(finalRequest); } catch (Exception 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 updateGatewayRouteAsync(UpdateGatewayRouteRequest request) { return updateGatewayRouteAsync(request, null); } @Override public java.util.concurrent.Future updateGatewayRouteAsync(final UpdateGatewayRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateGatewayRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateGatewayRouteResult call() throws Exception { UpdateGatewayRouteResult result = null; try { result = executeUpdateGatewayRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateMeshAsync(UpdateMeshRequest request) { return updateMeshAsync(request, null); } @Override public java.util.concurrent.Future updateMeshAsync(final UpdateMeshRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateMeshRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateMeshResult call() throws Exception { UpdateMeshResult result = null; try { result = executeUpdateMesh(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateRouteAsync(UpdateRouteRequest request) { return updateRouteAsync(request, null); } @Override public java.util.concurrent.Future updateRouteAsync(final UpdateRouteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRouteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRouteResult call() throws Exception { UpdateRouteResult result = null; try { result = executeUpdateRoute(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateVirtualGatewayAsync(UpdateVirtualGatewayRequest request) { return updateVirtualGatewayAsync(request, null); } @Override public java.util.concurrent.Future updateVirtualGatewayAsync(final UpdateVirtualGatewayRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVirtualGatewayRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVirtualGatewayResult call() throws Exception { UpdateVirtualGatewayResult result = null; try { result = executeUpdateVirtualGateway(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateVirtualNodeAsync(UpdateVirtualNodeRequest request) { return updateVirtualNodeAsync(request, null); } @Override public java.util.concurrent.Future updateVirtualNodeAsync(final UpdateVirtualNodeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVirtualNodeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVirtualNodeResult call() throws Exception { UpdateVirtualNodeResult result = null; try { result = executeUpdateVirtualNode(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateVirtualRouterAsync(UpdateVirtualRouterRequest request) { return updateVirtualRouterAsync(request, null); } @Override public java.util.concurrent.Future updateVirtualRouterAsync(final UpdateVirtualRouterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVirtualRouterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVirtualRouterResult call() throws Exception { UpdateVirtualRouterResult result = null; try { result = executeUpdateVirtualRouter(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateVirtualServiceAsync(UpdateVirtualServiceRequest request) { return updateVirtualServiceAsync(request, null); } @Override public java.util.concurrent.Future updateVirtualServiceAsync(final UpdateVirtualServiceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVirtualServiceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVirtualServiceResult call() throws Exception { UpdateVirtualServiceResult result = null; try { result = executeUpdateVirtualService(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