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

com.amazonaws.services.elasticloadbalancingv2.AmazonElasticLoadBalancingAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Elastic Load Balancing module holds the client classes that are used for communicating with Elastic Load Balancing Service (API Version 2015-12-01)

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.elasticloadbalancingv2;

import static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.elasticloadbalancingv2.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

/**
 * Client for accessing Elastic Load Balancing v2 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.
 * 

* Elastic Load Balancing *

* A load balancer distributes incoming traffic across targets, such as your EC2 instances. This enables you to increase * the availability of your application. The load balancer also monitors the health of its registered targets and * ensures that it routes traffic only to healthy targets. You configure your load balancer to accept incoming traffic * by specifying one or more listeners, which are configured with a protocol and port number for connections from * clients to the load balancer. You configure a target group with a protocol and port number for connections from the * load balancer to the targets, and with health check settings to be used when checking the health status of the * targets. *

*

* Elastic Load Balancing supports the following types of load balancers: Application Load Balancers, Network Load * Balancers, Gateway Load Balancers, and Classic Load Balancers. This reference covers the following load balancer * types: *

*
    *
  • *

    * Application Load Balancer - Operates at the application layer (layer 7) and supports HTTP and HTTPS. *

    *
  • *
  • *

    * Network Load Balancer - Operates at the transport layer (layer 4) and supports TCP, TLS, and UDP. *

    *
  • *
  • *

    * Gateway Load Balancer - Operates at the network layer (layer 3). *

    *
  • *
*

* For more information, see the Elastic * Load Balancing User Guide. *

*

* All Elastic Load Balancing operations are idempotent, which means that they complete at most one time. If you repeat * an operation, it succeeds. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonElasticLoadBalancingAsyncClient extends AmazonElasticLoadBalancingClient implements AmazonElasticLoadBalancingAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2. A credentials * provider chain will be used that searches for credentials in this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2. A credentials * provider chain will be used that searches for credentials in this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param clientConfiguration * The client configuration options controlling how this client connects to Elastic Load Balancing v2 (ex: * proxy settings, retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * AWS account credentials. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * AWS account credentials and executor service. Default client settings will be used. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * AWS account credentials, executor service, and client configuration options. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * AWS account credentials provider. Default client settings will be used. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the provided * AWS account credentials provider and client configuration options. *

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * AWS account credentials provider and executor service. Default client settings will be used. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * AWS account credentials provider, executor service, and client configuration options. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticLoadBalancingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonElasticLoadBalancingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticLoadBalancingAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonElasticLoadBalancingAsyncClientBuilder asyncBuilder() { return AmazonElasticLoadBalancingAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonElasticLoadBalancingAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Elastic Load Balancing v2 using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonElasticLoadBalancingAsyncClient(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 addListenerCertificatesAsync(AddListenerCertificatesRequest request) { return addListenerCertificatesAsync(request, null); } @Override public java.util.concurrent.Future addListenerCertificatesAsync(final AddListenerCertificatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddListenerCertificatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddListenerCertificatesResult call() throws Exception { AddListenerCertificatesResult result = null; try { result = executeAddListenerCertificates(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 addTagsAsync(AddTagsRequest request) { return addTagsAsync(request, null); } @Override public java.util.concurrent.Future addTagsAsync(final AddTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddTagsResult call() throws Exception { AddTagsResult result = null; try { result = executeAddTags(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 addTrustStoreRevocationsAsync(AddTrustStoreRevocationsRequest request) { return addTrustStoreRevocationsAsync(request, null); } @Override public java.util.concurrent.Future addTrustStoreRevocationsAsync(final AddTrustStoreRevocationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddTrustStoreRevocationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddTrustStoreRevocationsResult call() throws Exception { AddTrustStoreRevocationsResult result = null; try { result = executeAddTrustStoreRevocations(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 createLoadBalancerAsync(CreateLoadBalancerRequest request) { return createLoadBalancerAsync(request, null); } @Override public java.util.concurrent.Future createLoadBalancerAsync(final CreateLoadBalancerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateLoadBalancerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateLoadBalancerResult call() throws Exception { CreateLoadBalancerResult result = null; try { result = executeCreateLoadBalancer(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 createRuleAsync(CreateRuleRequest request) { return createRuleAsync(request, null); } @Override public java.util.concurrent.Future createRuleAsync(final CreateRuleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRuleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRuleResult call() throws Exception { CreateRuleResult result = null; try { result = executeCreateRule(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 createTargetGroupAsync(CreateTargetGroupRequest request) { return createTargetGroupAsync(request, null); } @Override public java.util.concurrent.Future createTargetGroupAsync(final CreateTargetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTargetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTargetGroupResult call() throws Exception { CreateTargetGroupResult result = null; try { result = executeCreateTargetGroup(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 createTrustStoreAsync(CreateTrustStoreRequest request) { return createTrustStoreAsync(request, null); } @Override public java.util.concurrent.Future createTrustStoreAsync(final CreateTrustStoreRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTrustStoreRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTrustStoreResult call() throws Exception { CreateTrustStoreResult result = null; try { result = executeCreateTrustStore(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 deleteLoadBalancerAsync(DeleteLoadBalancerRequest request) { return deleteLoadBalancerAsync(request, null); } @Override public java.util.concurrent.Future deleteLoadBalancerAsync(final DeleteLoadBalancerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteLoadBalancerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteLoadBalancerResult call() throws Exception { DeleteLoadBalancerResult result = null; try { result = executeDeleteLoadBalancer(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 deleteRuleAsync(DeleteRuleRequest request) { return deleteRuleAsync(request, null); } @Override public java.util.concurrent.Future deleteRuleAsync(final DeleteRuleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRuleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRuleResult call() throws Exception { DeleteRuleResult result = null; try { result = executeDeleteRule(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 deleteSharedTrustStoreAssociationAsync( DeleteSharedTrustStoreAssociationRequest request) { return deleteSharedTrustStoreAssociationAsync(request, null); } @Override public java.util.concurrent.Future deleteSharedTrustStoreAssociationAsync( final DeleteSharedTrustStoreAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSharedTrustStoreAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSharedTrustStoreAssociationResult call() throws Exception { DeleteSharedTrustStoreAssociationResult result = null; try { result = executeDeleteSharedTrustStoreAssociation(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 deleteTargetGroupAsync(DeleteTargetGroupRequest request) { return deleteTargetGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteTargetGroupAsync(final DeleteTargetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTargetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTargetGroupResult call() throws Exception { DeleteTargetGroupResult result = null; try { result = executeDeleteTargetGroup(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 deleteTrustStoreAsync(DeleteTrustStoreRequest request) { return deleteTrustStoreAsync(request, null); } @Override public java.util.concurrent.Future deleteTrustStoreAsync(final DeleteTrustStoreRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTrustStoreRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTrustStoreResult call() throws Exception { DeleteTrustStoreResult result = null; try { result = executeDeleteTrustStore(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 deregisterTargetsAsync(DeregisterTargetsRequest request) { return deregisterTargetsAsync(request, null); } @Override public java.util.concurrent.Future deregisterTargetsAsync(final DeregisterTargetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeregisterTargetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeregisterTargetsResult call() throws Exception { DeregisterTargetsResult result = null; try { result = executeDeregisterTargets(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 describeAccountLimitsAsync(DescribeAccountLimitsRequest request) { return describeAccountLimitsAsync(request, null); } @Override public java.util.concurrent.Future describeAccountLimitsAsync(final DescribeAccountLimitsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAccountLimitsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAccountLimitsResult call() throws Exception { DescribeAccountLimitsResult result = null; try { result = executeDescribeAccountLimits(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 describeListenerCertificatesAsync(DescribeListenerCertificatesRequest request) { return describeListenerCertificatesAsync(request, null); } @Override public java.util.concurrent.Future describeListenerCertificatesAsync(final DescribeListenerCertificatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeListenerCertificatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeListenerCertificatesResult call() throws Exception { DescribeListenerCertificatesResult result = null; try { result = executeDescribeListenerCertificates(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 describeListenersAsync(DescribeListenersRequest request) { return describeListenersAsync(request, null); } @Override public java.util.concurrent.Future describeListenersAsync(final DescribeListenersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeListenersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeListenersResult call() throws Exception { DescribeListenersResult result = null; try { result = executeDescribeListeners(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 describeLoadBalancerAttributesAsync(DescribeLoadBalancerAttributesRequest request) { return describeLoadBalancerAttributesAsync(request, null); } @Override public java.util.concurrent.Future describeLoadBalancerAttributesAsync( final DescribeLoadBalancerAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLoadBalancerAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLoadBalancerAttributesResult call() throws Exception { DescribeLoadBalancerAttributesResult result = null; try { result = executeDescribeLoadBalancerAttributes(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 describeLoadBalancersAsync(DescribeLoadBalancersRequest request) { return describeLoadBalancersAsync(request, null); } @Override public java.util.concurrent.Future describeLoadBalancersAsync(final DescribeLoadBalancersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLoadBalancersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLoadBalancersResult call() throws Exception { DescribeLoadBalancersResult result = null; try { result = executeDescribeLoadBalancers(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 describeRulesAsync(DescribeRulesRequest request) { return describeRulesAsync(request, null); } @Override public java.util.concurrent.Future describeRulesAsync(final DescribeRulesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRulesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRulesResult call() throws Exception { DescribeRulesResult result = null; try { result = executeDescribeRules(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 describeSSLPoliciesAsync(DescribeSSLPoliciesRequest request) { return describeSSLPoliciesAsync(request, null); } @Override public java.util.concurrent.Future describeSSLPoliciesAsync(final DescribeSSLPoliciesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSSLPoliciesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSSLPoliciesResult call() throws Exception { DescribeSSLPoliciesResult result = null; try { result = executeDescribeSSLPolicies(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 describeTagsAsync(DescribeTagsRequest request) { return describeTagsAsync(request, null); } @Override public java.util.concurrent.Future describeTagsAsync(final DescribeTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTagsResult call() throws Exception { DescribeTagsResult result = null; try { result = executeDescribeTags(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 describeTargetGroupAttributesAsync(DescribeTargetGroupAttributesRequest request) { return describeTargetGroupAttributesAsync(request, null); } @Override public java.util.concurrent.Future describeTargetGroupAttributesAsync( final DescribeTargetGroupAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTargetGroupAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTargetGroupAttributesResult call() throws Exception { DescribeTargetGroupAttributesResult result = null; try { result = executeDescribeTargetGroupAttributes(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 describeTargetGroupsAsync(DescribeTargetGroupsRequest request) { return describeTargetGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeTargetGroupsAsync(final DescribeTargetGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTargetGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTargetGroupsResult call() throws Exception { DescribeTargetGroupsResult result = null; try { result = executeDescribeTargetGroups(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 describeTargetHealthAsync(DescribeTargetHealthRequest request) { return describeTargetHealthAsync(request, null); } @Override public java.util.concurrent.Future describeTargetHealthAsync(final DescribeTargetHealthRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTargetHealthRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTargetHealthResult call() throws Exception { DescribeTargetHealthResult result = null; try { result = executeDescribeTargetHealth(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 describeTrustStoreAssociationsAsync(DescribeTrustStoreAssociationsRequest request) { return describeTrustStoreAssociationsAsync(request, null); } @Override public java.util.concurrent.Future describeTrustStoreAssociationsAsync( final DescribeTrustStoreAssociationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTrustStoreAssociationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTrustStoreAssociationsResult call() throws Exception { DescribeTrustStoreAssociationsResult result = null; try { result = executeDescribeTrustStoreAssociations(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 describeTrustStoreRevocationsAsync(DescribeTrustStoreRevocationsRequest request) { return describeTrustStoreRevocationsAsync(request, null); } @Override public java.util.concurrent.Future describeTrustStoreRevocationsAsync( final DescribeTrustStoreRevocationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTrustStoreRevocationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTrustStoreRevocationsResult call() throws Exception { DescribeTrustStoreRevocationsResult result = null; try { result = executeDescribeTrustStoreRevocations(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 describeTrustStoresAsync(DescribeTrustStoresRequest request) { return describeTrustStoresAsync(request, null); } @Override public java.util.concurrent.Future describeTrustStoresAsync(final DescribeTrustStoresRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTrustStoresRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTrustStoresResult call() throws Exception { DescribeTrustStoresResult result = null; try { result = executeDescribeTrustStores(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 getResourcePolicyAsync(GetResourcePolicyRequest request) { return getResourcePolicyAsync(request, null); } @Override public java.util.concurrent.Future getResourcePolicyAsync(final GetResourcePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetResourcePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetResourcePolicyResult call() throws Exception { GetResourcePolicyResult result = null; try { result = executeGetResourcePolicy(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 getTrustStoreCaCertificatesBundleAsync( GetTrustStoreCaCertificatesBundleRequest request) { return getTrustStoreCaCertificatesBundleAsync(request, null); } @Override public java.util.concurrent.Future getTrustStoreCaCertificatesBundleAsync( final GetTrustStoreCaCertificatesBundleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTrustStoreCaCertificatesBundleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTrustStoreCaCertificatesBundleResult call() throws Exception { GetTrustStoreCaCertificatesBundleResult result = null; try { result = executeGetTrustStoreCaCertificatesBundle(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 getTrustStoreRevocationContentAsync(GetTrustStoreRevocationContentRequest request) { return getTrustStoreRevocationContentAsync(request, null); } @Override public java.util.concurrent.Future getTrustStoreRevocationContentAsync( final GetTrustStoreRevocationContentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTrustStoreRevocationContentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTrustStoreRevocationContentResult call() throws Exception { GetTrustStoreRevocationContentResult result = null; try { result = executeGetTrustStoreRevocationContent(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 modifyListenerAsync(ModifyListenerRequest request) { return modifyListenerAsync(request, null); } @Override public java.util.concurrent.Future modifyListenerAsync(final ModifyListenerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyListenerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyListenerResult call() throws Exception { ModifyListenerResult result = null; try { result = executeModifyListener(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 modifyLoadBalancerAttributesAsync(ModifyLoadBalancerAttributesRequest request) { return modifyLoadBalancerAttributesAsync(request, null); } @Override public java.util.concurrent.Future modifyLoadBalancerAttributesAsync(final ModifyLoadBalancerAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyLoadBalancerAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyLoadBalancerAttributesResult call() throws Exception { ModifyLoadBalancerAttributesResult result = null; try { result = executeModifyLoadBalancerAttributes(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 modifyRuleAsync(ModifyRuleRequest request) { return modifyRuleAsync(request, null); } @Override public java.util.concurrent.Future modifyRuleAsync(final ModifyRuleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyRuleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyRuleResult call() throws Exception { ModifyRuleResult result = null; try { result = executeModifyRule(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 modifyTargetGroupAsync(ModifyTargetGroupRequest request) { return modifyTargetGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyTargetGroupAsync(final ModifyTargetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyTargetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyTargetGroupResult call() throws Exception { ModifyTargetGroupResult result = null; try { result = executeModifyTargetGroup(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 modifyTargetGroupAttributesAsync(ModifyTargetGroupAttributesRequest request) { return modifyTargetGroupAttributesAsync(request, null); } @Override public java.util.concurrent.Future modifyTargetGroupAttributesAsync(final ModifyTargetGroupAttributesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyTargetGroupAttributesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyTargetGroupAttributesResult call() throws Exception { ModifyTargetGroupAttributesResult result = null; try { result = executeModifyTargetGroupAttributes(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 modifyTrustStoreAsync(ModifyTrustStoreRequest request) { return modifyTrustStoreAsync(request, null); } @Override public java.util.concurrent.Future modifyTrustStoreAsync(final ModifyTrustStoreRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyTrustStoreRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyTrustStoreResult call() throws Exception { ModifyTrustStoreResult result = null; try { result = executeModifyTrustStore(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 registerTargetsAsync(RegisterTargetsRequest request) { return registerTargetsAsync(request, null); } @Override public java.util.concurrent.Future registerTargetsAsync(final RegisterTargetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RegisterTargetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RegisterTargetsResult call() throws Exception { RegisterTargetsResult result = null; try { result = executeRegisterTargets(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 removeListenerCertificatesAsync(RemoveListenerCertificatesRequest request) { return removeListenerCertificatesAsync(request, null); } @Override public java.util.concurrent.Future removeListenerCertificatesAsync(final RemoveListenerCertificatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveListenerCertificatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveListenerCertificatesResult call() throws Exception { RemoveListenerCertificatesResult result = null; try { result = executeRemoveListenerCertificates(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 removeTagsAsync(RemoveTagsRequest request) { return removeTagsAsync(request, null); } @Override public java.util.concurrent.Future removeTagsAsync(final RemoveTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveTagsResult call() throws Exception { RemoveTagsResult result = null; try { result = executeRemoveTags(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 removeTrustStoreRevocationsAsync(RemoveTrustStoreRevocationsRequest request) { return removeTrustStoreRevocationsAsync(request, null); } @Override public java.util.concurrent.Future removeTrustStoreRevocationsAsync(final RemoveTrustStoreRevocationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveTrustStoreRevocationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveTrustStoreRevocationsResult call() throws Exception { RemoveTrustStoreRevocationsResult result = null; try { result = executeRemoveTrustStoreRevocations(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 setIpAddressTypeAsync(SetIpAddressTypeRequest request) { return setIpAddressTypeAsync(request, null); } @Override public java.util.concurrent.Future setIpAddressTypeAsync(final SetIpAddressTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SetIpAddressTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SetIpAddressTypeResult call() throws Exception { SetIpAddressTypeResult result = null; try { result = executeSetIpAddressType(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 setRulePrioritiesAsync(SetRulePrioritiesRequest request) { return setRulePrioritiesAsync(request, null); } @Override public java.util.concurrent.Future setRulePrioritiesAsync(final SetRulePrioritiesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SetRulePrioritiesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SetRulePrioritiesResult call() throws Exception { SetRulePrioritiesResult result = null; try { result = executeSetRulePriorities(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 setSecurityGroupsAsync(SetSecurityGroupsRequest request) { return setSecurityGroupsAsync(request, null); } @Override public java.util.concurrent.Future setSecurityGroupsAsync(final SetSecurityGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SetSecurityGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SetSecurityGroupsResult call() throws Exception { SetSecurityGroupsResult result = null; try { result = executeSetSecurityGroups(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 setSubnetsAsync(SetSubnetsRequest request) { return setSubnetsAsync(request, null); } @Override public java.util.concurrent.Future setSubnetsAsync(final SetSubnetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SetSubnetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SetSubnetsResult call() throws Exception { SetSubnetsResult result = null; try { result = executeSetSubnets(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