com.amazonaws.services.autoscaling.AmazonAutoScalingAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-autoscaling Show documentation
/*
* Copyright 2012-2017 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.autoscaling;
import static java.util.concurrent.Executors.newFixedThreadPool;
import javax.annotation.Generated;
import com.amazonaws.services.autoscaling.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 Auto Scaling 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.
*
* Auto Scaling
*
* Auto Scaling is designed to automatically launch or terminate EC2 instances based on user-defined policies,
* schedules, and health checks. Use this service in conjunction with the Amazon CloudWatch and Elastic Load Balancing
* services.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonAutoScalingAsyncClient extends AmazonAutoScalingClient implements AmazonAutoScalingAsync {
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 Auto Scaling. 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 AmazonAutoScalingAsyncClientBuilder#defaultClient()}
*/
@Deprecated
public AmazonAutoScalingAsyncClient() {
this(DefaultAWSCredentialsProviderChain.getInstance());
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling. 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 Auto Scaling (ex: proxy settings,
* retry counts, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonAutoScalingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
this(awsCredentials, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling 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 AmazonAutoScalingAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonAutoScalingAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonAutoScalingAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
public static AmazonAutoScalingAsyncClientBuilder asyncBuilder() {
return AmazonAutoScalingAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Auto Scaling using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonAutoScalingAsyncClient(AwsAsyncClientParams asyncClientParams) {
super(asyncClientParams);
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 attachInstancesAsync(AttachInstancesRequest request) {
return attachInstancesAsync(request, null);
}
@Override
public java.util.concurrent.Future attachInstancesAsync(final AttachInstancesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachInstancesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachInstancesResult call() throws Exception {
AttachInstancesResult result = null;
try {
result = executeAttachInstances(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 attachLoadBalancerTargetGroupsAsync(AttachLoadBalancerTargetGroupsRequest request) {
return attachLoadBalancerTargetGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future attachLoadBalancerTargetGroupsAsync(
final AttachLoadBalancerTargetGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachLoadBalancerTargetGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachLoadBalancerTargetGroupsResult call() throws Exception {
AttachLoadBalancerTargetGroupsResult result = null;
try {
result = executeAttachLoadBalancerTargetGroups(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 attachLoadBalancersAsync(AttachLoadBalancersRequest request) {
return attachLoadBalancersAsync(request, null);
}
@Override
public java.util.concurrent.Future attachLoadBalancersAsync(final AttachLoadBalancersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachLoadBalancersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachLoadBalancersResult call() throws Exception {
AttachLoadBalancersResult result = null;
try {
result = executeAttachLoadBalancers(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the AttachLoadBalancers operation.
*
* @see #attachLoadBalancersAsync(AttachLoadBalancersRequest)
*/
@Override
public java.util.concurrent.Future attachLoadBalancersAsync() {
return attachLoadBalancersAsync(new AttachLoadBalancersRequest());
}
/**
* Simplified method form for invoking the AttachLoadBalancers operation with an AsyncHandler.
*
* @see #attachLoadBalancersAsync(AttachLoadBalancersRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future attachLoadBalancersAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return attachLoadBalancersAsync(new AttachLoadBalancersRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future completeLifecycleActionAsync(CompleteLifecycleActionRequest request) {
return completeLifecycleActionAsync(request, null);
}
@Override
public java.util.concurrent.Future completeLifecycleActionAsync(final CompleteLifecycleActionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CompleteLifecycleActionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CompleteLifecycleActionResult call() throws Exception {
CompleteLifecycleActionResult result = null;
try {
result = executeCompleteLifecycleAction(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 createAutoScalingGroupAsync(CreateAutoScalingGroupRequest request) {
return createAutoScalingGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future createAutoScalingGroupAsync(final CreateAutoScalingGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAutoScalingGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAutoScalingGroupResult call() throws Exception {
CreateAutoScalingGroupResult result = null;
try {
result = executeCreateAutoScalingGroup(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 createLaunchConfigurationAsync(CreateLaunchConfigurationRequest request) {
return createLaunchConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future createLaunchConfigurationAsync(final CreateLaunchConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLaunchConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLaunchConfigurationResult call() throws Exception {
CreateLaunchConfigurationResult result = null;
try {
result = executeCreateLaunchConfiguration(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 createOrUpdateTagsAsync(CreateOrUpdateTagsRequest request) {
return createOrUpdateTagsAsync(request, null);
}
@Override
public java.util.concurrent.Future createOrUpdateTagsAsync(final CreateOrUpdateTagsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateOrUpdateTagsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateOrUpdateTagsResult call() throws Exception {
CreateOrUpdateTagsResult result = null;
try {
result = executeCreateOrUpdateTags(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 deleteAutoScalingGroupAsync(DeleteAutoScalingGroupRequest request) {
return deleteAutoScalingGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAutoScalingGroupAsync(final DeleteAutoScalingGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAutoScalingGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAutoScalingGroupResult call() throws Exception {
DeleteAutoScalingGroupResult result = null;
try {
result = executeDeleteAutoScalingGroup(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 deleteLaunchConfigurationAsync(DeleteLaunchConfigurationRequest request) {
return deleteLaunchConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLaunchConfigurationAsync(final DeleteLaunchConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLaunchConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLaunchConfigurationResult call() throws Exception {
DeleteLaunchConfigurationResult result = null;
try {
result = executeDeleteLaunchConfiguration(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 deleteLifecycleHookAsync(DeleteLifecycleHookRequest request) {
return deleteLifecycleHookAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLifecycleHookAsync(final DeleteLifecycleHookRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLifecycleHookRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLifecycleHookResult call() throws Exception {
DeleteLifecycleHookResult result = null;
try {
result = executeDeleteLifecycleHook(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 deleteNotificationConfigurationAsync(
DeleteNotificationConfigurationRequest request) {
return deleteNotificationConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteNotificationConfigurationAsync(
final DeleteNotificationConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteNotificationConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteNotificationConfigurationResult call() throws Exception {
DeleteNotificationConfigurationResult result = null;
try {
result = executeDeleteNotificationConfiguration(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 deletePolicyAsync(DeletePolicyRequest request) {
return deletePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePolicyAsync(final DeletePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePolicyResult call() throws Exception {
DeletePolicyResult result = null;
try {
result = executeDeletePolicy(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 deleteScheduledActionAsync(DeleteScheduledActionRequest request) {
return deleteScheduledActionAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteScheduledActionAsync(final DeleteScheduledActionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteScheduledActionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteScheduledActionResult call() throws Exception {
DeleteScheduledActionResult result = null;
try {
result = executeDeleteScheduledAction(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 deleteTagsAsync(DeleteTagsRequest request) {
return deleteTagsAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteTagsAsync(final DeleteTagsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteTagsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteTagsResult call() throws Exception {
DeleteTagsResult result = null;
try {
result = executeDeleteTags(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;
}
});
}
/**
* Simplified method form for invoking the DescribeAccountLimits operation.
*
* @see #describeAccountLimitsAsync(DescribeAccountLimitsRequest)
*/
@Override
public java.util.concurrent.Future describeAccountLimitsAsync() {
return describeAccountLimitsAsync(new DescribeAccountLimitsRequest());
}
/**
* Simplified method form for invoking the DescribeAccountLimits operation with an AsyncHandler.
*
* @see #describeAccountLimitsAsync(DescribeAccountLimitsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeAccountLimitsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeAccountLimitsAsync(new DescribeAccountLimitsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeAdjustmentTypesAsync(DescribeAdjustmentTypesRequest request) {
return describeAdjustmentTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAdjustmentTypesAsync(final DescribeAdjustmentTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAdjustmentTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAdjustmentTypesResult call() throws Exception {
DescribeAdjustmentTypesResult result = null;
try {
result = executeDescribeAdjustmentTypes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeAdjustmentTypes operation.
*
* @see #describeAdjustmentTypesAsync(DescribeAdjustmentTypesRequest)
*/
@Override
public java.util.concurrent.Future describeAdjustmentTypesAsync() {
return describeAdjustmentTypesAsync(new DescribeAdjustmentTypesRequest());
}
/**
* Simplified method form for invoking the DescribeAdjustmentTypes operation with an AsyncHandler.
*
* @see #describeAdjustmentTypesAsync(DescribeAdjustmentTypesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeAdjustmentTypesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeAdjustmentTypesAsync(new DescribeAdjustmentTypesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeAutoScalingGroupsAsync(DescribeAutoScalingGroupsRequest request) {
return describeAutoScalingGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAutoScalingGroupsAsync(final DescribeAutoScalingGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAutoScalingGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAutoScalingGroupsResult call() throws Exception {
DescribeAutoScalingGroupsResult result = null;
try {
result = executeDescribeAutoScalingGroups(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeAutoScalingGroups operation.
*
* @see #describeAutoScalingGroupsAsync(DescribeAutoScalingGroupsRequest)
*/
@Override
public java.util.concurrent.Future describeAutoScalingGroupsAsync() {
return describeAutoScalingGroupsAsync(new DescribeAutoScalingGroupsRequest());
}
/**
* Simplified method form for invoking the DescribeAutoScalingGroups operation with an AsyncHandler.
*
* @see #describeAutoScalingGroupsAsync(DescribeAutoScalingGroupsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeAutoScalingGroupsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeAutoScalingGroupsAsync(new DescribeAutoScalingGroupsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeAutoScalingInstancesAsync(DescribeAutoScalingInstancesRequest request) {
return describeAutoScalingInstancesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAutoScalingInstancesAsync(final DescribeAutoScalingInstancesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAutoScalingInstancesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAutoScalingInstancesResult call() throws Exception {
DescribeAutoScalingInstancesResult result = null;
try {
result = executeDescribeAutoScalingInstances(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeAutoScalingInstances operation.
*
* @see #describeAutoScalingInstancesAsync(DescribeAutoScalingInstancesRequest)
*/
@Override
public java.util.concurrent.Future describeAutoScalingInstancesAsync() {
return describeAutoScalingInstancesAsync(new DescribeAutoScalingInstancesRequest());
}
/**
* Simplified method form for invoking the DescribeAutoScalingInstances operation with an AsyncHandler.
*
* @see #describeAutoScalingInstancesAsync(DescribeAutoScalingInstancesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeAutoScalingInstancesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeAutoScalingInstancesAsync(new DescribeAutoScalingInstancesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeAutoScalingNotificationTypesAsync(
DescribeAutoScalingNotificationTypesRequest request) {
return describeAutoScalingNotificationTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAutoScalingNotificationTypesAsync(
final DescribeAutoScalingNotificationTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAutoScalingNotificationTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAutoScalingNotificationTypesResult call() throws Exception {
DescribeAutoScalingNotificationTypesResult result = null;
try {
result = executeDescribeAutoScalingNotificationTypes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeAutoScalingNotificationTypes operation.
*
* @see #describeAutoScalingNotificationTypesAsync(DescribeAutoScalingNotificationTypesRequest)
*/
@Override
public java.util.concurrent.Future describeAutoScalingNotificationTypesAsync() {
return describeAutoScalingNotificationTypesAsync(new DescribeAutoScalingNotificationTypesRequest());
}
/**
* Simplified method form for invoking the DescribeAutoScalingNotificationTypes operation with an AsyncHandler.
*
* @see #describeAutoScalingNotificationTypesAsync(DescribeAutoScalingNotificationTypesRequest,
* com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeAutoScalingNotificationTypesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeAutoScalingNotificationTypesAsync(new DescribeAutoScalingNotificationTypesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeLaunchConfigurationsAsync(DescribeLaunchConfigurationsRequest request) {
return describeLaunchConfigurationsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLaunchConfigurationsAsync(final DescribeLaunchConfigurationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLaunchConfigurationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLaunchConfigurationsResult call() throws Exception {
DescribeLaunchConfigurationsResult result = null;
try {
result = executeDescribeLaunchConfigurations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeLaunchConfigurations operation.
*
* @see #describeLaunchConfigurationsAsync(DescribeLaunchConfigurationsRequest)
*/
@Override
public java.util.concurrent.Future describeLaunchConfigurationsAsync() {
return describeLaunchConfigurationsAsync(new DescribeLaunchConfigurationsRequest());
}
/**
* Simplified method form for invoking the DescribeLaunchConfigurations operation with an AsyncHandler.
*
* @see #describeLaunchConfigurationsAsync(DescribeLaunchConfigurationsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeLaunchConfigurationsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeLaunchConfigurationsAsync(new DescribeLaunchConfigurationsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeLifecycleHookTypesAsync(DescribeLifecycleHookTypesRequest request) {
return describeLifecycleHookTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLifecycleHookTypesAsync(final DescribeLifecycleHookTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLifecycleHookTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLifecycleHookTypesResult call() throws Exception {
DescribeLifecycleHookTypesResult result = null;
try {
result = executeDescribeLifecycleHookTypes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeLifecycleHookTypes operation.
*
* @see #describeLifecycleHookTypesAsync(DescribeLifecycleHookTypesRequest)
*/
@Override
public java.util.concurrent.Future describeLifecycleHookTypesAsync() {
return describeLifecycleHookTypesAsync(new DescribeLifecycleHookTypesRequest());
}
/**
* Simplified method form for invoking the DescribeLifecycleHookTypes operation with an AsyncHandler.
*
* @see #describeLifecycleHookTypesAsync(DescribeLifecycleHookTypesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeLifecycleHookTypesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeLifecycleHookTypesAsync(new DescribeLifecycleHookTypesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeLifecycleHooksAsync(DescribeLifecycleHooksRequest request) {
return describeLifecycleHooksAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLifecycleHooksAsync(final DescribeLifecycleHooksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLifecycleHooksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLifecycleHooksResult call() throws Exception {
DescribeLifecycleHooksResult result = null;
try {
result = executeDescribeLifecycleHooks(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 describeLoadBalancerTargetGroupsAsync(
DescribeLoadBalancerTargetGroupsRequest request) {
return describeLoadBalancerTargetGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLoadBalancerTargetGroupsAsync(
final DescribeLoadBalancerTargetGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLoadBalancerTargetGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLoadBalancerTargetGroupsResult call() throws Exception {
DescribeLoadBalancerTargetGroupsResult result = null;
try {
result = executeDescribeLoadBalancerTargetGroups(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 describeMetricCollectionTypesAsync(DescribeMetricCollectionTypesRequest request) {
return describeMetricCollectionTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeMetricCollectionTypesAsync(
final DescribeMetricCollectionTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeMetricCollectionTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeMetricCollectionTypesResult call() throws Exception {
DescribeMetricCollectionTypesResult result = null;
try {
result = executeDescribeMetricCollectionTypes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeMetricCollectionTypes operation.
*
* @see #describeMetricCollectionTypesAsync(DescribeMetricCollectionTypesRequest)
*/
@Override
public java.util.concurrent.Future describeMetricCollectionTypesAsync() {
return describeMetricCollectionTypesAsync(new DescribeMetricCollectionTypesRequest());
}
/**
* Simplified method form for invoking the DescribeMetricCollectionTypes operation with an AsyncHandler.
*
* @see #describeMetricCollectionTypesAsync(DescribeMetricCollectionTypesRequest,
* com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeMetricCollectionTypesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeMetricCollectionTypesAsync(new DescribeMetricCollectionTypesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeNotificationConfigurationsAsync(
DescribeNotificationConfigurationsRequest request) {
return describeNotificationConfigurationsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeNotificationConfigurationsAsync(
final DescribeNotificationConfigurationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeNotificationConfigurationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeNotificationConfigurationsResult call() throws Exception {
DescribeNotificationConfigurationsResult result = null;
try {
result = executeDescribeNotificationConfigurations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeNotificationConfigurations operation.
*
* @see #describeNotificationConfigurationsAsync(DescribeNotificationConfigurationsRequest)
*/
@Override
public java.util.concurrent.Future describeNotificationConfigurationsAsync() {
return describeNotificationConfigurationsAsync(new DescribeNotificationConfigurationsRequest());
}
/**
* Simplified method form for invoking the DescribeNotificationConfigurations operation with an AsyncHandler.
*
* @see #describeNotificationConfigurationsAsync(DescribeNotificationConfigurationsRequest,
* com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeNotificationConfigurationsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeNotificationConfigurationsAsync(new DescribeNotificationConfigurationsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describePoliciesAsync(DescribePoliciesRequest request) {
return describePoliciesAsync(request, null);
}
@Override
public java.util.concurrent.Future describePoliciesAsync(final DescribePoliciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribePoliciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribePoliciesResult call() throws Exception {
DescribePoliciesResult result = null;
try {
result = executeDescribePolicies(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribePolicies operation.
*
* @see #describePoliciesAsync(DescribePoliciesRequest)
*/
@Override
public java.util.concurrent.Future describePoliciesAsync() {
return describePoliciesAsync(new DescribePoliciesRequest());
}
/**
* Simplified method form for invoking the DescribePolicies operation with an AsyncHandler.
*
* @see #describePoliciesAsync(DescribePoliciesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describePoliciesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describePoliciesAsync(new DescribePoliciesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeScalingActivitiesAsync(DescribeScalingActivitiesRequest request) {
return describeScalingActivitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeScalingActivitiesAsync(final DescribeScalingActivitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeScalingActivitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeScalingActivitiesResult call() throws Exception {
DescribeScalingActivitiesResult result = null;
try {
result = executeDescribeScalingActivities(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeScalingActivities operation.
*
* @see #describeScalingActivitiesAsync(DescribeScalingActivitiesRequest)
*/
@Override
public java.util.concurrent.Future describeScalingActivitiesAsync() {
return describeScalingActivitiesAsync(new DescribeScalingActivitiesRequest());
}
/**
* Simplified method form for invoking the DescribeScalingActivities operation with an AsyncHandler.
*
* @see #describeScalingActivitiesAsync(DescribeScalingActivitiesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeScalingActivitiesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeScalingActivitiesAsync(new DescribeScalingActivitiesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeScalingProcessTypesAsync(DescribeScalingProcessTypesRequest request) {
return describeScalingProcessTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeScalingProcessTypesAsync(final DescribeScalingProcessTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeScalingProcessTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeScalingProcessTypesResult call() throws Exception {
DescribeScalingProcessTypesResult result = null;
try {
result = executeDescribeScalingProcessTypes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeScalingProcessTypes operation.
*
* @see #describeScalingProcessTypesAsync(DescribeScalingProcessTypesRequest)
*/
@Override
public java.util.concurrent.Future describeScalingProcessTypesAsync() {
return describeScalingProcessTypesAsync(new DescribeScalingProcessTypesRequest());
}
/**
* Simplified method form for invoking the DescribeScalingProcessTypes operation with an AsyncHandler.
*
* @see #describeScalingProcessTypesAsync(DescribeScalingProcessTypesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeScalingProcessTypesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeScalingProcessTypesAsync(new DescribeScalingProcessTypesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeScheduledActionsAsync(DescribeScheduledActionsRequest request) {
return describeScheduledActionsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeScheduledActionsAsync(final DescribeScheduledActionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeScheduledActionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeScheduledActionsResult call() throws Exception {
DescribeScheduledActionsResult result = null;
try {
result = executeDescribeScheduledActions(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeScheduledActions operation.
*
* @see #describeScheduledActionsAsync(DescribeScheduledActionsRequest)
*/
@Override
public java.util.concurrent.Future describeScheduledActionsAsync() {
return describeScheduledActionsAsync(new DescribeScheduledActionsRequest());
}
/**
* Simplified method form for invoking the DescribeScheduledActions operation with an AsyncHandler.
*
* @see #describeScheduledActionsAsync(DescribeScheduledActionsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeScheduledActionsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeScheduledActionsAsync(new DescribeScheduledActionsRequest(), asyncHandler);
}
@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;
}
});
}
/**
* Simplified method form for invoking the DescribeTags operation.
*
* @see #describeTagsAsync(DescribeTagsRequest)
*/
@Override
public java.util.concurrent.Future describeTagsAsync() {
return describeTagsAsync(new DescribeTagsRequest());
}
/**
* Simplified method form for invoking the DescribeTags operation with an AsyncHandler.
*
* @see #describeTagsAsync(DescribeTagsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeTagsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeTagsAsync(new DescribeTagsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeTerminationPolicyTypesAsync(DescribeTerminationPolicyTypesRequest request) {
return describeTerminationPolicyTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTerminationPolicyTypesAsync(
final DescribeTerminationPolicyTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTerminationPolicyTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTerminationPolicyTypesResult call() throws Exception {
DescribeTerminationPolicyTypesResult result = null;
try {
result = executeDescribeTerminationPolicyTypes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeTerminationPolicyTypes operation.
*
* @see #describeTerminationPolicyTypesAsync(DescribeTerminationPolicyTypesRequest)
*/
@Override
public java.util.concurrent.Future describeTerminationPolicyTypesAsync() {
return describeTerminationPolicyTypesAsync(new DescribeTerminationPolicyTypesRequest());
}
/**
* Simplified method form for invoking the DescribeTerminationPolicyTypes operation with an AsyncHandler.
*
* @see #describeTerminationPolicyTypesAsync(DescribeTerminationPolicyTypesRequest,
* com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeTerminationPolicyTypesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeTerminationPolicyTypesAsync(new DescribeTerminationPolicyTypesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future detachInstancesAsync(DetachInstancesRequest request) {
return detachInstancesAsync(request, null);
}
@Override
public java.util.concurrent.Future detachInstancesAsync(final DetachInstancesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetachInstancesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetachInstancesResult call() throws Exception {
DetachInstancesResult result = null;
try {
result = executeDetachInstances(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 detachLoadBalancerTargetGroupsAsync(DetachLoadBalancerTargetGroupsRequest request) {
return detachLoadBalancerTargetGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future detachLoadBalancerTargetGroupsAsync(
final DetachLoadBalancerTargetGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetachLoadBalancerTargetGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetachLoadBalancerTargetGroupsResult call() throws Exception {
DetachLoadBalancerTargetGroupsResult result = null;
try {
result = executeDetachLoadBalancerTargetGroups(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 detachLoadBalancersAsync(DetachLoadBalancersRequest request) {
return detachLoadBalancersAsync(request, null);
}
@Override
public java.util.concurrent.Future detachLoadBalancersAsync(final DetachLoadBalancersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetachLoadBalancersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetachLoadBalancersResult call() throws Exception {
DetachLoadBalancersResult result = null;
try {
result = executeDetachLoadBalancers(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DetachLoadBalancers operation.
*
* @see #detachLoadBalancersAsync(DetachLoadBalancersRequest)
*/
@Override
public java.util.concurrent.Future detachLoadBalancersAsync() {
return detachLoadBalancersAsync(new DetachLoadBalancersRequest());
}
/**
* Simplified method form for invoking the DetachLoadBalancers operation with an AsyncHandler.
*
* @see #detachLoadBalancersAsync(DetachLoadBalancersRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future detachLoadBalancersAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return detachLoadBalancersAsync(new DetachLoadBalancersRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future disableMetricsCollectionAsync(DisableMetricsCollectionRequest request) {
return disableMetricsCollectionAsync(request, null);
}
@Override
public java.util.concurrent.Future disableMetricsCollectionAsync(final DisableMetricsCollectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableMetricsCollectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableMetricsCollectionResult call() throws Exception {
DisableMetricsCollectionResult result = null;
try {
result = executeDisableMetricsCollection(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 enableMetricsCollectionAsync(EnableMetricsCollectionRequest request) {
return enableMetricsCollectionAsync(request, null);
}
@Override
public java.util.concurrent.Future enableMetricsCollectionAsync(final EnableMetricsCollectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableMetricsCollectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableMetricsCollectionResult call() throws Exception {
EnableMetricsCollectionResult result = null;
try {
result = executeEnableMetricsCollection(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 enterStandbyAsync(EnterStandbyRequest request) {
return enterStandbyAsync(request, null);
}
@Override
public java.util.concurrent.Future enterStandbyAsync(final EnterStandbyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnterStandbyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnterStandbyResult call() throws Exception {
EnterStandbyResult result = null;
try {
result = executeEnterStandby(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 executePolicyAsync(ExecutePolicyRequest request) {
return executePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future executePolicyAsync(final ExecutePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ExecutePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ExecutePolicyResult call() throws Exception {
ExecutePolicyResult result = null;
try {
result = executeExecutePolicy(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 exitStandbyAsync(ExitStandbyRequest request) {
return exitStandbyAsync(request, null);
}
@Override
public java.util.concurrent.Future exitStandbyAsync(final ExitStandbyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ExitStandbyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ExitStandbyResult call() throws Exception {
ExitStandbyResult result = null;
try {
result = executeExitStandby(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 putLifecycleHookAsync(PutLifecycleHookRequest request) {
return putLifecycleHookAsync(request, null);
}
@Override
public java.util.concurrent.Future putLifecycleHookAsync(final PutLifecycleHookRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutLifecycleHookRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutLifecycleHookResult call() throws Exception {
PutLifecycleHookResult result = null;
try {
result = executePutLifecycleHook(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 putNotificationConfigurationAsync(PutNotificationConfigurationRequest request) {
return putNotificationConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future putNotificationConfigurationAsync(final PutNotificationConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutNotificationConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutNotificationConfigurationResult call() throws Exception {
PutNotificationConfigurationResult result = null;
try {
result = executePutNotificationConfiguration(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 putScalingPolicyAsync(PutScalingPolicyRequest request) {
return putScalingPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future putScalingPolicyAsync(final PutScalingPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutScalingPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutScalingPolicyResult call() throws Exception {
PutScalingPolicyResult result = null;
try {
result = executePutScalingPolicy(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 putScheduledUpdateGroupActionAsync(PutScheduledUpdateGroupActionRequest request) {
return putScheduledUpdateGroupActionAsync(request, null);
}
@Override
public java.util.concurrent.Future putScheduledUpdateGroupActionAsync(
final PutScheduledUpdateGroupActionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutScheduledUpdateGroupActionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutScheduledUpdateGroupActionResult call() throws Exception {
PutScheduledUpdateGroupActionResult result = null;
try {
result = executePutScheduledUpdateGroupAction(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 recordLifecycleActionHeartbeatAsync(RecordLifecycleActionHeartbeatRequest request) {
return recordLifecycleActionHeartbeatAsync(request, null);
}
@Override
public java.util.concurrent.Future recordLifecycleActionHeartbeatAsync(
final RecordLifecycleActionHeartbeatRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RecordLifecycleActionHeartbeatRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RecordLifecycleActionHeartbeatResult call() throws Exception {
RecordLifecycleActionHeartbeatResult result = null;
try {
result = executeRecordLifecycleActionHeartbeat(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 resumeProcessesAsync(ResumeProcessesRequest request) {
return resumeProcessesAsync(request, null);
}
@Override
public java.util.concurrent.Future resumeProcessesAsync(final ResumeProcessesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ResumeProcessesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ResumeProcessesResult call() throws Exception {
ResumeProcessesResult result = null;
try {
result = executeResumeProcesses(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 setDesiredCapacityAsync(SetDesiredCapacityRequest request) {
return setDesiredCapacityAsync(request, null);
}
@Override
public java.util.concurrent.Future setDesiredCapacityAsync(final SetDesiredCapacityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetDesiredCapacityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetDesiredCapacityResult call() throws Exception {
SetDesiredCapacityResult result = null;
try {
result = executeSetDesiredCapacity(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 setInstanceHealthAsync(SetInstanceHealthRequest request) {
return setInstanceHealthAsync(request, null);
}
@Override
public java.util.concurrent.Future setInstanceHealthAsync(final SetInstanceHealthRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetInstanceHealthRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetInstanceHealthResult call() throws Exception {
SetInstanceHealthResult result = null;
try {
result = executeSetInstanceHealth(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 setInstanceProtectionAsync(SetInstanceProtectionRequest request) {
return setInstanceProtectionAsync(request, null);
}
@Override
public java.util.concurrent.Future setInstanceProtectionAsync(final SetInstanceProtectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SetInstanceProtectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SetInstanceProtectionResult call() throws Exception {
SetInstanceProtectionResult result = null;
try {
result = executeSetInstanceProtection(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 suspendProcessesAsync(SuspendProcessesRequest request) {
return suspendProcessesAsync(request, null);
}
@Override
public java.util.concurrent.Future suspendProcessesAsync(final SuspendProcessesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SuspendProcessesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable