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

com.amazonaws.services.globalaccelerator.AWSGlobalAcceleratorAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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.globalaccelerator;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS Global Accelerator 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 Global Accelerator *

* This is the AWS Global Accelerator API Reference. This guide is for developers who need detailed information * about AWS Global Accelerator API actions, data types, and errors. For more information about Global Accelerator * features, see the AWS Global * Accelerator Developer Guide. *

*

* AWS Global Accelerator is a service in which you create accelerators to improve the performance of your * applications for local and global users. Depending on the type of accelerator you choose, you can gain additional * benefits. *

*
    *
  • *

    * By using a standard accelerator, you can improve availability of your internet applications that are used by a global * audience. With a standard accelerator, Global Accelerator directs traffic to optimal endpoints over the AWS global * network. *

    *
  • *
  • *

    * For other scenarios, you might choose a custom routing accelerator. With a custom routing accelerator, you can use * application logic to directly map one or more users to a specific endpoint among many endpoints. *

    *
  • *
* *

* Global Accelerator is a global service that supports endpoints in multiple AWS Regions but you must specify the US * West (Oregon) Region to create or update accelerators. *

*
*

* By default, Global Accelerator provides you with two static IP addresses that you associate with your accelerator. * With a standard accelerator, instead of using the IP addresses that Global Accelerator provides, you can configure * these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator. The * static IP addresses are anycast from the AWS edge network. For a standard accelerator, they distribute incoming * application traffic across multiple endpoint resources in multiple AWS Regions, which increases the availability of * your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, * Amazon EC2 instances, or Elastic IP addresses that are located in one AWS Region or multiple Regions. For custom * routing accelerators, you map traffic that arrives to the static IP addresses to specific Amazon EC2 servers in * endpoints that are virtual private cloud (VPC) subnets. *

* *

* The static IP addresses remain assigned to your accelerator for as long as it exists, even if you disable the * accelerator and it no longer accepts or routes traffic. However, when you delete an accelerator, you lose the * static IP addresses that are assigned to it, so you can no longer route traffic by using them. You can use IAM * policies like tag-based permissions with Global Accelerator to limit the users who have permissions to delete an * accelerator. For more information, see Tag-based policies. *

*
*

* For standard accelerators, Global Accelerator uses the AWS global network to route traffic to the optimal regional * endpoint based on health, client location, and policies that you configure. The service reacts instantly to changes * in health or configuration to ensure that internet traffic from clients is always directed to healthy endpoints. *

*

* For a list of the AWS Regions where Global Accelerator and other services are currently supported, see the AWS Region Table. *

*

* AWS Global Accelerator includes the following components: *

*
*
Static IP addresses
*
*

* Global Accelerator provides you with a set of two static IP addresses that are anycast from the AWS edge network. If * you bring your own IP address range to AWS (BYOIP) to use with a standard accelerator, you can instead assign IP * addresses from your own pool to use with your accelerator. For more information, see Bring your own IP addresses (BYOIP) * in AWS Global Accelerator. *

*

* The IP addresses serve as single fixed entry points for your clients. If you already have Elastic Load Balancing load * balancers, Amazon EC2 instances, or Elastic IP address resources set up for your applications, you can easily add * those to a standard accelerator in Global Accelerator. This allows Global Accelerator to use static IP addresses to * access the resources. *

*

* The static IP addresses remain assigned to your accelerator for as long as it exists, even if you disable the * accelerator and it no longer accepts or routes traffic. However, when you delete an accelerator, you lose the * static IP addresses that are assigned to it, so you can no longer route traffic by using them. You can use IAM * policies like tag-based permissions with Global Accelerator to delete an accelerator. For more information, see Tag-based * policies. *

*
*
Accelerator
*
*

* An accelerator directs traffic to endpoints over the AWS global network to improve the performance of your internet * applications. Each accelerator includes one or more listeners. *

*

* There are two types of accelerators: *

*
    *
  • *

    * A standard accelerator directs traffic to the optimal AWS endpoint based on several factors, including the * user’s location, the health of the endpoint, and the endpoint weights that you configure. This improves the * availability and performance of your applications. Endpoints can be Network Load Balancers, Application Load * Balancers, Amazon EC2 instances, or Elastic IP addresses. *

    *
  • *
  • *

    * A custom routing accelerator directs traffic to one of possibly thousands of Amazon EC2 instances running in a * single or multiple virtual private clouds (VPCs). With custom routing, listener ports are mapped to statically * associate port ranges with VPC subnets, which allows Global Accelerator to determine an EC2 instance IP address at * the time of connection. By default, all port mapping destinations in a VPC subnet can't receive traffic. You can * choose to configure all destinations in the subnet to receive traffic, or to specify individual port mappings that * can receive traffic. *

    *
  • *
*

* For more information, see Types of * accelerators. *

*
*
DNS name
*
*

* Global Accelerator assigns each accelerator a default Domain Name System (DNS) name, similar to * a1234567890abcdef.awsglobalaccelerator.com, that points to the static IP addresses that Global * Accelerator assigns to you or that you choose from your own IP address range. Depending on the use case, you can use * your accelerator's static IP addresses or DNS name to route traffic to your accelerator, or set up DNS records to * route traffic using your own custom domain name. *

*
*
Network zone
*
*

* A network zone services the static IP addresses for your accelerator from a unique IP subnet. Similar to an AWS * Availability Zone, a network zone is an isolated unit with its own set of physical infrastructure. When you configure * an accelerator, by default, Global Accelerator allocates two IPv4 addresses for it. If one IP address from a network * zone becomes unavailable due to IP address blocking by certain client networks, or network disruptions, then client * applications can retry on the healthy static IP address from the other isolated network zone. *

*
*
Listener
*
*

* A listener processes inbound connections from clients to Global Accelerator, based on the port (or port range) and * protocol (or protocols) that you configure. A listener can be configured for TCP, UDP, or both TCP and UDP protocols. * Each listener has one or more endpoint groups associated with it, and traffic is forwarded to endpoints in one of the * groups. You associate endpoint groups with listeners by specifying the Regions that you want to distribute traffic * to. With a standard accelerator, traffic is distributed to optimal endpoints within the endpoint groups associated * with a listener. *

*
*
Endpoint group
*
*

* Each endpoint group is associated with a specific AWS Region. Endpoint groups include one or more endpoints in the * Region. With a standard accelerator, you can increase or reduce the percentage of traffic that would be otherwise * directed to an endpoint group by adjusting a setting called a traffic dial. The traffic dial lets you easily * do performance testing or blue/green deployment testing, for example, for new releases across different AWS Regions. *

*
*
Endpoint
*
*

* An endpoint is a resource that Global Accelerator directs traffic to. *

*

* Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, Amazon EC2 instances, * or Elastic IP addresses. An Application Load Balancer endpoint can be internet-facing or internal. Traffic for * standard accelerators is routed to endpoints based on the health of the endpoint along with configuration options * that you choose, such as endpoint weights. For each endpoint, you can configure weights, which are numbers that you * can use to specify the proportion of traffic to route to each one. This can be useful, for example, to do performance * testing within a Region. *

*

* Endpoints for custom routing accelerators are virtual private cloud (VPC) subnets with one or many EC2 instances. *

*
*
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSGlobalAcceleratorAsyncClient extends AWSGlobalAcceleratorClient implements AWSGlobalAcceleratorAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSGlobalAcceleratorAsyncClientBuilder asyncBuilder() { return AWSGlobalAcceleratorAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS Global Accelerator using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSGlobalAcceleratorAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS Global Accelerator using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSGlobalAcceleratorAsyncClient(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 addCustomRoutingEndpointsAsync(AddCustomRoutingEndpointsRequest request) { return addCustomRoutingEndpointsAsync(request, null); } @Override public java.util.concurrent.Future addCustomRoutingEndpointsAsync(final AddCustomRoutingEndpointsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddCustomRoutingEndpointsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddCustomRoutingEndpointsResult call() throws Exception { AddCustomRoutingEndpointsResult result = null; try { result = executeAddCustomRoutingEndpoints(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 advertiseByoipCidrAsync(AdvertiseByoipCidrRequest request) { return advertiseByoipCidrAsync(request, null); } @Override public java.util.concurrent.Future advertiseByoipCidrAsync(final AdvertiseByoipCidrRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AdvertiseByoipCidrRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AdvertiseByoipCidrResult call() throws Exception { AdvertiseByoipCidrResult result = null; try { result = executeAdvertiseByoipCidr(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 allowCustomRoutingTrafficAsync(AllowCustomRoutingTrafficRequest request) { return allowCustomRoutingTrafficAsync(request, null); } @Override public java.util.concurrent.Future allowCustomRoutingTrafficAsync(final AllowCustomRoutingTrafficRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AllowCustomRoutingTrafficRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AllowCustomRoutingTrafficResult call() throws Exception { AllowCustomRoutingTrafficResult result = null; try { result = executeAllowCustomRoutingTraffic(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 createAcceleratorAsync(CreateAcceleratorRequest request) { return createAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future createAcceleratorAsync(final CreateAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateAcceleratorResult call() throws Exception { CreateAcceleratorResult result = null; try { result = executeCreateAccelerator(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 createCustomRoutingAcceleratorAsync(CreateCustomRoutingAcceleratorRequest request) { return createCustomRoutingAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future createCustomRoutingAcceleratorAsync( final CreateCustomRoutingAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCustomRoutingAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCustomRoutingAcceleratorResult call() throws Exception { CreateCustomRoutingAcceleratorResult result = null; try { result = executeCreateCustomRoutingAccelerator(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 createCustomRoutingEndpointGroupAsync( CreateCustomRoutingEndpointGroupRequest request) { return createCustomRoutingEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future createCustomRoutingEndpointGroupAsync( final CreateCustomRoutingEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCustomRoutingEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCustomRoutingEndpointGroupResult call() throws Exception { CreateCustomRoutingEndpointGroupResult result = null; try { result = executeCreateCustomRoutingEndpointGroup(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 createCustomRoutingListenerAsync(CreateCustomRoutingListenerRequest request) { return createCustomRoutingListenerAsync(request, null); } @Override public java.util.concurrent.Future createCustomRoutingListenerAsync(final CreateCustomRoutingListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCustomRoutingListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCustomRoutingListenerResult call() throws Exception { CreateCustomRoutingListenerResult result = null; try { result = executeCreateCustomRoutingListener(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 createEndpointGroupAsync(CreateEndpointGroupRequest request) { return createEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future createEndpointGroupAsync(final CreateEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateEndpointGroupResult call() throws Exception { CreateEndpointGroupResult result = null; try { result = executeCreateEndpointGroup(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 createListenerAsync(CreateListenerRequest request) { return createListenerAsync(request, null); } @Override public java.util.concurrent.Future createListenerAsync(final CreateListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateListenerResult call() throws Exception { CreateListenerResult result = null; try { result = executeCreateListener(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 deleteAcceleratorAsync(DeleteAcceleratorRequest request) { return deleteAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future deleteAcceleratorAsync(final DeleteAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteAcceleratorResult call() throws Exception { DeleteAcceleratorResult result = null; try { result = executeDeleteAccelerator(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 deleteCustomRoutingAcceleratorAsync(DeleteCustomRoutingAcceleratorRequest request) { return deleteCustomRoutingAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future deleteCustomRoutingAcceleratorAsync( final DeleteCustomRoutingAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCustomRoutingAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCustomRoutingAcceleratorResult call() throws Exception { DeleteCustomRoutingAcceleratorResult result = null; try { result = executeDeleteCustomRoutingAccelerator(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 deleteCustomRoutingEndpointGroupAsync( DeleteCustomRoutingEndpointGroupRequest request) { return deleteCustomRoutingEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteCustomRoutingEndpointGroupAsync( final DeleteCustomRoutingEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCustomRoutingEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCustomRoutingEndpointGroupResult call() throws Exception { DeleteCustomRoutingEndpointGroupResult result = null; try { result = executeDeleteCustomRoutingEndpointGroup(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 deleteCustomRoutingListenerAsync(DeleteCustomRoutingListenerRequest request) { return deleteCustomRoutingListenerAsync(request, null); } @Override public java.util.concurrent.Future deleteCustomRoutingListenerAsync(final DeleteCustomRoutingListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCustomRoutingListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCustomRoutingListenerResult call() throws Exception { DeleteCustomRoutingListenerResult result = null; try { result = executeDeleteCustomRoutingListener(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 deleteEndpointGroupAsync(DeleteEndpointGroupRequest request) { return deleteEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteEndpointGroupAsync(final DeleteEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEndpointGroupResult call() throws Exception { DeleteEndpointGroupResult result = null; try { result = executeDeleteEndpointGroup(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 deleteListenerAsync(DeleteListenerRequest request) { return deleteListenerAsync(request, null); } @Override public java.util.concurrent.Future deleteListenerAsync(final DeleteListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteListenerResult call() throws Exception { DeleteListenerResult result = null; try { result = executeDeleteListener(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 denyCustomRoutingTrafficAsync(DenyCustomRoutingTrafficRequest request) { return denyCustomRoutingTrafficAsync(request, null); } @Override public java.util.concurrent.Future denyCustomRoutingTrafficAsync(final DenyCustomRoutingTrafficRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DenyCustomRoutingTrafficRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DenyCustomRoutingTrafficResult call() throws Exception { DenyCustomRoutingTrafficResult result = null; try { result = executeDenyCustomRoutingTraffic(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 deprovisionByoipCidrAsync(DeprovisionByoipCidrRequest request) { return deprovisionByoipCidrAsync(request, null); } @Override public java.util.concurrent.Future deprovisionByoipCidrAsync(final DeprovisionByoipCidrRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeprovisionByoipCidrRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeprovisionByoipCidrResult call() throws Exception { DeprovisionByoipCidrResult result = null; try { result = executeDeprovisionByoipCidr(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 describeAcceleratorAsync(DescribeAcceleratorRequest request) { return describeAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future describeAcceleratorAsync(final DescribeAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAcceleratorResult call() throws Exception { DescribeAcceleratorResult result = null; try { result = executeDescribeAccelerator(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 describeAcceleratorAttributesAsync(DescribeAcceleratorAttributesRequest request) { return describeAcceleratorAttributesAsync(request, null); } @Override public java.util.concurrent.Future describeAcceleratorAttributesAsync( final DescribeAcceleratorAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAcceleratorAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAcceleratorAttributesResult call() throws Exception { DescribeAcceleratorAttributesResult result = null; try { result = executeDescribeAcceleratorAttributes(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 describeCustomRoutingAcceleratorAsync( DescribeCustomRoutingAcceleratorRequest request) { return describeCustomRoutingAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future describeCustomRoutingAcceleratorAsync( final DescribeCustomRoutingAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCustomRoutingAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCustomRoutingAcceleratorResult call() throws Exception { DescribeCustomRoutingAcceleratorResult result = null; try { result = executeDescribeCustomRoutingAccelerator(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 describeCustomRoutingAcceleratorAttributesAsync( DescribeCustomRoutingAcceleratorAttributesRequest request) { return describeCustomRoutingAcceleratorAttributesAsync(request, null); } @Override public java.util.concurrent.Future describeCustomRoutingAcceleratorAttributesAsync( final DescribeCustomRoutingAcceleratorAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCustomRoutingAcceleratorAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCustomRoutingAcceleratorAttributesResult call() throws Exception { DescribeCustomRoutingAcceleratorAttributesResult result = null; try { result = executeDescribeCustomRoutingAcceleratorAttributes(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 describeCustomRoutingEndpointGroupAsync( DescribeCustomRoutingEndpointGroupRequest request) { return describeCustomRoutingEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future describeCustomRoutingEndpointGroupAsync( final DescribeCustomRoutingEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCustomRoutingEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCustomRoutingEndpointGroupResult call() throws Exception { DescribeCustomRoutingEndpointGroupResult result = null; try { result = executeDescribeCustomRoutingEndpointGroup(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 describeCustomRoutingListenerAsync(DescribeCustomRoutingListenerRequest request) { return describeCustomRoutingListenerAsync(request, null); } @Override public java.util.concurrent.Future describeCustomRoutingListenerAsync( final DescribeCustomRoutingListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCustomRoutingListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCustomRoutingListenerResult call() throws Exception { DescribeCustomRoutingListenerResult result = null; try { result = executeDescribeCustomRoutingListener(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 describeEndpointGroupAsync(DescribeEndpointGroupRequest request) { return describeEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future describeEndpointGroupAsync(final DescribeEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEndpointGroupResult call() throws Exception { DescribeEndpointGroupResult result = null; try { result = executeDescribeEndpointGroup(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 describeListenerAsync(DescribeListenerRequest request) { return describeListenerAsync(request, null); } @Override public java.util.concurrent.Future describeListenerAsync(final DescribeListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeListenerResult call() throws Exception { DescribeListenerResult result = null; try { result = executeDescribeListener(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 listAcceleratorsAsync(ListAcceleratorsRequest request) { return listAcceleratorsAsync(request, null); } @Override public java.util.concurrent.Future listAcceleratorsAsync(final ListAcceleratorsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAcceleratorsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAcceleratorsResult call() throws Exception { ListAcceleratorsResult result = null; try { result = executeListAccelerators(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 listByoipCidrsAsync(ListByoipCidrsRequest request) { return listByoipCidrsAsync(request, null); } @Override public java.util.concurrent.Future listByoipCidrsAsync(final ListByoipCidrsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListByoipCidrsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListByoipCidrsResult call() throws Exception { ListByoipCidrsResult result = null; try { result = executeListByoipCidrs(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 listCustomRoutingAcceleratorsAsync(ListCustomRoutingAcceleratorsRequest request) { return listCustomRoutingAcceleratorsAsync(request, null); } @Override public java.util.concurrent.Future listCustomRoutingAcceleratorsAsync( final ListCustomRoutingAcceleratorsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCustomRoutingAcceleratorsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCustomRoutingAcceleratorsResult call() throws Exception { ListCustomRoutingAcceleratorsResult result = null; try { result = executeListCustomRoutingAccelerators(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 listCustomRoutingEndpointGroupsAsync( ListCustomRoutingEndpointGroupsRequest request) { return listCustomRoutingEndpointGroupsAsync(request, null); } @Override public java.util.concurrent.Future listCustomRoutingEndpointGroupsAsync( final ListCustomRoutingEndpointGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCustomRoutingEndpointGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCustomRoutingEndpointGroupsResult call() throws Exception { ListCustomRoutingEndpointGroupsResult result = null; try { result = executeListCustomRoutingEndpointGroups(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 listCustomRoutingListenersAsync(ListCustomRoutingListenersRequest request) { return listCustomRoutingListenersAsync(request, null); } @Override public java.util.concurrent.Future listCustomRoutingListenersAsync(final ListCustomRoutingListenersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCustomRoutingListenersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCustomRoutingListenersResult call() throws Exception { ListCustomRoutingListenersResult result = null; try { result = executeListCustomRoutingListeners(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 listCustomRoutingPortMappingsAsync(ListCustomRoutingPortMappingsRequest request) { return listCustomRoutingPortMappingsAsync(request, null); } @Override public java.util.concurrent.Future listCustomRoutingPortMappingsAsync( final ListCustomRoutingPortMappingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCustomRoutingPortMappingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCustomRoutingPortMappingsResult call() throws Exception { ListCustomRoutingPortMappingsResult result = null; try { result = executeListCustomRoutingPortMappings(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 listCustomRoutingPortMappingsByDestinationAsync( ListCustomRoutingPortMappingsByDestinationRequest request) { return listCustomRoutingPortMappingsByDestinationAsync(request, null); } @Override public java.util.concurrent.Future listCustomRoutingPortMappingsByDestinationAsync( final ListCustomRoutingPortMappingsByDestinationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCustomRoutingPortMappingsByDestinationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCustomRoutingPortMappingsByDestinationResult call() throws Exception { ListCustomRoutingPortMappingsByDestinationResult result = null; try { result = executeListCustomRoutingPortMappingsByDestination(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 listEndpointGroupsAsync(ListEndpointGroupsRequest request) { return listEndpointGroupsAsync(request, null); } @Override public java.util.concurrent.Future listEndpointGroupsAsync(final ListEndpointGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEndpointGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEndpointGroupsResult call() throws Exception { ListEndpointGroupsResult result = null; try { result = executeListEndpointGroups(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 listListenersAsync(ListListenersRequest request) { return listListenersAsync(request, null); } @Override public java.util.concurrent.Future listListenersAsync(final ListListenersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListListenersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListListenersResult call() throws Exception { ListListenersResult result = null; try { result = executeListListeners(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 provisionByoipCidrAsync(ProvisionByoipCidrRequest request) { return provisionByoipCidrAsync(request, null); } @Override public java.util.concurrent.Future provisionByoipCidrAsync(final ProvisionByoipCidrRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ProvisionByoipCidrRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ProvisionByoipCidrResult call() throws Exception { ProvisionByoipCidrResult result = null; try { result = executeProvisionByoipCidr(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 removeCustomRoutingEndpointsAsync(RemoveCustomRoutingEndpointsRequest request) { return removeCustomRoutingEndpointsAsync(request, null); } @Override public java.util.concurrent.Future removeCustomRoutingEndpointsAsync(final RemoveCustomRoutingEndpointsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveCustomRoutingEndpointsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveCustomRoutingEndpointsResult call() throws Exception { RemoveCustomRoutingEndpointsResult result = null; try { result = executeRemoveCustomRoutingEndpoints(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 updateAcceleratorAsync(UpdateAcceleratorRequest request) { return updateAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future updateAcceleratorAsync(final UpdateAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateAcceleratorResult call() throws Exception { UpdateAcceleratorResult result = null; try { result = executeUpdateAccelerator(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 updateAcceleratorAttributesAsync(UpdateAcceleratorAttributesRequest request) { return updateAcceleratorAttributesAsync(request, null); } @Override public java.util.concurrent.Future updateAcceleratorAttributesAsync(final UpdateAcceleratorAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateAcceleratorAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateAcceleratorAttributesResult call() throws Exception { UpdateAcceleratorAttributesResult result = null; try { result = executeUpdateAcceleratorAttributes(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 updateCustomRoutingAcceleratorAsync(UpdateCustomRoutingAcceleratorRequest request) { return updateCustomRoutingAcceleratorAsync(request, null); } @Override public java.util.concurrent.Future updateCustomRoutingAcceleratorAsync( final UpdateCustomRoutingAcceleratorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCustomRoutingAcceleratorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCustomRoutingAcceleratorResult call() throws Exception { UpdateCustomRoutingAcceleratorResult result = null; try { result = executeUpdateCustomRoutingAccelerator(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 updateCustomRoutingAcceleratorAttributesAsync( UpdateCustomRoutingAcceleratorAttributesRequest request) { return updateCustomRoutingAcceleratorAttributesAsync(request, null); } @Override public java.util.concurrent.Future updateCustomRoutingAcceleratorAttributesAsync( final UpdateCustomRoutingAcceleratorAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCustomRoutingAcceleratorAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCustomRoutingAcceleratorAttributesResult call() throws Exception { UpdateCustomRoutingAcceleratorAttributesResult result = null; try { result = executeUpdateCustomRoutingAcceleratorAttributes(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 updateCustomRoutingListenerAsync(UpdateCustomRoutingListenerRequest request) { return updateCustomRoutingListenerAsync(request, null); } @Override public java.util.concurrent.Future updateCustomRoutingListenerAsync(final UpdateCustomRoutingListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCustomRoutingListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCustomRoutingListenerResult call() throws Exception { UpdateCustomRoutingListenerResult result = null; try { result = executeUpdateCustomRoutingListener(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 updateEndpointGroupAsync(UpdateEndpointGroupRequest request) { return updateEndpointGroupAsync(request, null); } @Override public java.util.concurrent.Future updateEndpointGroupAsync(final UpdateEndpointGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateEndpointGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateEndpointGroupResult call() throws Exception { UpdateEndpointGroupResult result = null; try { result = executeUpdateEndpointGroup(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 updateListenerAsync(UpdateListenerRequest request) { return updateListenerAsync(request, null); } @Override public java.util.concurrent.Future updateListenerAsync(final UpdateListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateListenerResult call() throws Exception { UpdateListenerResult result = null; try { result = executeUpdateListener(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 withdrawByoipCidrAsync(WithdrawByoipCidrRequest request) { return withdrawByoipCidrAsync(request, null); } @Override public java.util.concurrent.Future withdrawByoipCidrAsync(final WithdrawByoipCidrRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final WithdrawByoipCidrRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public WithdrawByoipCidrResult call() throws Exception { WithdrawByoipCidrResult result = null; try { result = executeWithdrawByoipCidr(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