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

com.amazonaws.services.codedeploy.AmazonCodeDeployAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.codedeploy;

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

import javax.annotation.Generated;

import com.amazonaws.services.codedeploy.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 CodeDeploy 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.
 * 

*

* CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises * instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service. *

*

* You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated * applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia * files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or * Bitbucket repositories. You do not need to make changes to your existing code before you can use CodeDeploy. *

*

* CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application * deployment, and handles the complexity of updating your applications, without many of the risks associated with * error-prone manual deployments. *

*

* CodeDeploy Components *

*

* Use the information in this guide to help you work with the following CodeDeploy components: *

*
    *
  • *

    * Application: A name that uniquely identifies the application you want to deploy. CodeDeploy uses this name, * which functions as a container, to ensure the correct combination of revision, deployment configuration, and * deployment group are referenced during a deployment. *

    *
  • *
  • *

    * Deployment group: A set of individual instances, CodeDeploy Lambda deployment configuration settings, or an * Amazon ECS service and network details. A Lambda deployment group specifies how to route traffic to a new version of * a Lambda function. An Amazon ECS deployment group specifies the service created in Amazon ECS to deploy, a load * balancer, and a listener to reroute production traffic to an updated containerized application. An Amazon * EC2/On-premises deployment group contains individually tagged instances, Amazon EC2 instances in Amazon EC2 Auto * Scaling groups, or both. All deployment groups can specify optional trigger, alarm, and rollback settings. *

    *
  • *
  • *

    * Deployment configuration: A set of deployment rules and deployment success and failure conditions used by * CodeDeploy during a deployment. *

    *
  • *
  • *

    * Deployment: The process and the components used when updating a Lambda function, a containerized application * in an Amazon ECS service, or of installing content on one or more instances. *

    *
  • *
  • *

    * Application revisions: For an Lambda deployment, this is an AppSpec file that specifies the Lambda function to * be updated and one or more functions to validate deployment lifecycle events. For an Amazon ECS deployment, this is * an AppSpec file that specifies the Amazon ECS task definition, container, and port where production traffic is * rerouted. For an EC2/On-premises deployment, this is an archive file that contains source content—source code, * webpages, executable files, and deployment scripts—along with an AppSpec file. Revisions are stored in Amazon S3 * buckets or GitHub repositories. For Amazon S3, a revision is uniquely identified by its Amazon S3 object key and its * ETag, version, or both. For GitHub, a revision is uniquely identified by its commit ID. *

    *
  • *
*

* This guide also contains information to help you get details about the instances in your deployments, to make * on-premises instances available for CodeDeploy deployments, to get details about a Lambda function deployment, and to * get details about Amazon ECS service deployments. *

*

* CodeDeploy Information Resources *

* */ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonCodeDeployAsyncClient extends AmazonCodeDeployClient implements AmazonCodeDeployAsync { 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 CodeDeploy. 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 AmazonCodeDeployAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonCodeDeployAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy. 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 CodeDeploy (ex: proxy settings, * retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonCodeDeployAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonCodeDeployAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCodeDeployAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCodeDeployAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonCodeDeployAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCodeDeployAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCodeDeployAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy 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 AmazonCodeDeployAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCodeDeployAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonCodeDeployAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCodeDeployAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonCodeDeployAsyncClientBuilder asyncBuilder() { return AmazonCodeDeployAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonCodeDeployAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on CodeDeploy using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonCodeDeployAsyncClient(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 addTagsToOnPremisesInstancesAsync(AddTagsToOnPremisesInstancesRequest request) { return addTagsToOnPremisesInstancesAsync(request, null); } @Override public java.util.concurrent.Future addTagsToOnPremisesInstancesAsync(final AddTagsToOnPremisesInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddTagsToOnPremisesInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddTagsToOnPremisesInstancesResult call() throws Exception { AddTagsToOnPremisesInstancesResult result = null; try { result = executeAddTagsToOnPremisesInstances(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 batchGetApplicationRevisionsAsync(BatchGetApplicationRevisionsRequest request) { return batchGetApplicationRevisionsAsync(request, null); } @Override public java.util.concurrent.Future batchGetApplicationRevisionsAsync(final BatchGetApplicationRevisionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetApplicationRevisionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetApplicationRevisionsResult call() throws Exception { BatchGetApplicationRevisionsResult result = null; try { result = executeBatchGetApplicationRevisions(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 batchGetApplicationsAsync(BatchGetApplicationsRequest request) { return batchGetApplicationsAsync(request, null); } @Override public java.util.concurrent.Future batchGetApplicationsAsync(final BatchGetApplicationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetApplicationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetApplicationsResult call() throws Exception { BatchGetApplicationsResult result = null; try { result = executeBatchGetApplications(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 BatchGetApplications operation. * * @see #batchGetApplicationsAsync(BatchGetApplicationsRequest) */ @Override public java.util.concurrent.Future batchGetApplicationsAsync() { return batchGetApplicationsAsync(new BatchGetApplicationsRequest()); } /** * Simplified method form for invoking the BatchGetApplications operation with an AsyncHandler. * * @see #batchGetApplicationsAsync(BatchGetApplicationsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future batchGetApplicationsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return batchGetApplicationsAsync(new BatchGetApplicationsRequest(), asyncHandler); } @Override public java.util.concurrent.Future batchGetDeploymentGroupsAsync(BatchGetDeploymentGroupsRequest request) { return batchGetDeploymentGroupsAsync(request, null); } @Override public java.util.concurrent.Future batchGetDeploymentGroupsAsync(final BatchGetDeploymentGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetDeploymentGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetDeploymentGroupsResult call() throws Exception { BatchGetDeploymentGroupsResult result = null; try { result = executeBatchGetDeploymentGroups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future batchGetDeploymentInstancesAsync(BatchGetDeploymentInstancesRequest request) { return batchGetDeploymentInstancesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future batchGetDeploymentInstancesAsync(final BatchGetDeploymentInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetDeploymentInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetDeploymentInstancesResult call() throws Exception { BatchGetDeploymentInstancesResult result = null; try { result = executeBatchGetDeploymentInstances(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 batchGetDeploymentTargetsAsync(BatchGetDeploymentTargetsRequest request) { return batchGetDeploymentTargetsAsync(request, null); } @Override public java.util.concurrent.Future batchGetDeploymentTargetsAsync(final BatchGetDeploymentTargetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetDeploymentTargetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetDeploymentTargetsResult call() throws Exception { BatchGetDeploymentTargetsResult result = null; try { result = executeBatchGetDeploymentTargets(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 batchGetDeploymentsAsync(BatchGetDeploymentsRequest request) { return batchGetDeploymentsAsync(request, null); } @Override public java.util.concurrent.Future batchGetDeploymentsAsync(final BatchGetDeploymentsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetDeploymentsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetDeploymentsResult call() throws Exception { BatchGetDeploymentsResult result = null; try { result = executeBatchGetDeployments(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 BatchGetDeployments operation. * * @see #batchGetDeploymentsAsync(BatchGetDeploymentsRequest) */ @Override public java.util.concurrent.Future batchGetDeploymentsAsync() { return batchGetDeploymentsAsync(new BatchGetDeploymentsRequest()); } /** * Simplified method form for invoking the BatchGetDeployments operation with an AsyncHandler. * * @see #batchGetDeploymentsAsync(BatchGetDeploymentsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future batchGetDeploymentsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return batchGetDeploymentsAsync(new BatchGetDeploymentsRequest(), asyncHandler); } @Override public java.util.concurrent.Future batchGetOnPremisesInstancesAsync(BatchGetOnPremisesInstancesRequest request) { return batchGetOnPremisesInstancesAsync(request, null); } @Override public java.util.concurrent.Future batchGetOnPremisesInstancesAsync(final BatchGetOnPremisesInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchGetOnPremisesInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchGetOnPremisesInstancesResult call() throws Exception { BatchGetOnPremisesInstancesResult result = null; try { result = executeBatchGetOnPremisesInstances(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 BatchGetOnPremisesInstances operation. * * @see #batchGetOnPremisesInstancesAsync(BatchGetOnPremisesInstancesRequest) */ @Override public java.util.concurrent.Future batchGetOnPremisesInstancesAsync() { return batchGetOnPremisesInstancesAsync(new BatchGetOnPremisesInstancesRequest()); } /** * Simplified method form for invoking the BatchGetOnPremisesInstances operation with an AsyncHandler. * * @see #batchGetOnPremisesInstancesAsync(BatchGetOnPremisesInstancesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future batchGetOnPremisesInstancesAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return batchGetOnPremisesInstancesAsync(new BatchGetOnPremisesInstancesRequest(), asyncHandler); } @Override public java.util.concurrent.Future continueDeploymentAsync(ContinueDeploymentRequest request) { return continueDeploymentAsync(request, null); } @Override public java.util.concurrent.Future continueDeploymentAsync(final ContinueDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ContinueDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ContinueDeploymentResult call() throws Exception { ContinueDeploymentResult result = null; try { result = executeContinueDeployment(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 createApplicationAsync(CreateApplicationRequest request) { return createApplicationAsync(request, null); } @Override public java.util.concurrent.Future createApplicationAsync(final CreateApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateApplicationResult call() throws Exception { CreateApplicationResult result = null; try { result = executeCreateApplication(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 createDeploymentAsync(CreateDeploymentRequest request) { return createDeploymentAsync(request, null); } @Override public java.util.concurrent.Future createDeploymentAsync(final CreateDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDeploymentResult call() throws Exception { CreateDeploymentResult result = null; try { result = executeCreateDeployment(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 createDeploymentConfigAsync(CreateDeploymentConfigRequest request) { return createDeploymentConfigAsync(request, null); } @Override public java.util.concurrent.Future createDeploymentConfigAsync(final CreateDeploymentConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDeploymentConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDeploymentConfigResult call() throws Exception { CreateDeploymentConfigResult result = null; try { result = executeCreateDeploymentConfig(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 createDeploymentGroupAsync(CreateDeploymentGroupRequest request) { return createDeploymentGroupAsync(request, null); } @Override public java.util.concurrent.Future createDeploymentGroupAsync(final CreateDeploymentGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDeploymentGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDeploymentGroupResult call() throws Exception { CreateDeploymentGroupResult result = null; try { result = executeCreateDeploymentGroup(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 deleteApplicationAsync(DeleteApplicationRequest request) { return deleteApplicationAsync(request, null); } @Override public java.util.concurrent.Future deleteApplicationAsync(final DeleteApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteApplicationResult call() throws Exception { DeleteApplicationResult result = null; try { result = executeDeleteApplication(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 deleteDeploymentConfigAsync(DeleteDeploymentConfigRequest request) { return deleteDeploymentConfigAsync(request, null); } @Override public java.util.concurrent.Future deleteDeploymentConfigAsync(final DeleteDeploymentConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDeploymentConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDeploymentConfigResult call() throws Exception { DeleteDeploymentConfigResult result = null; try { result = executeDeleteDeploymentConfig(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 deleteDeploymentGroupAsync(DeleteDeploymentGroupRequest request) { return deleteDeploymentGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteDeploymentGroupAsync(final DeleteDeploymentGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDeploymentGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDeploymentGroupResult call() throws Exception { DeleteDeploymentGroupResult result = null; try { result = executeDeleteDeploymentGroup(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 deleteGitHubAccountTokenAsync(DeleteGitHubAccountTokenRequest request) { return deleteGitHubAccountTokenAsync(request, null); } @Override public java.util.concurrent.Future deleteGitHubAccountTokenAsync(final DeleteGitHubAccountTokenRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteGitHubAccountTokenRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteGitHubAccountTokenResult call() throws Exception { DeleteGitHubAccountTokenResult result = null; try { result = executeDeleteGitHubAccountToken(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 deleteResourcesByExternalIdAsync(DeleteResourcesByExternalIdRequest request) { return deleteResourcesByExternalIdAsync(request, null); } @Override public java.util.concurrent.Future deleteResourcesByExternalIdAsync(final DeleteResourcesByExternalIdRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteResourcesByExternalIdRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteResourcesByExternalIdResult call() throws Exception { DeleteResourcesByExternalIdResult result = null; try { result = executeDeleteResourcesByExternalId(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 deregisterOnPremisesInstanceAsync(DeregisterOnPremisesInstanceRequest request) { return deregisterOnPremisesInstanceAsync(request, null); } @Override public java.util.concurrent.Future deregisterOnPremisesInstanceAsync(final DeregisterOnPremisesInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeregisterOnPremisesInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeregisterOnPremisesInstanceResult call() throws Exception { DeregisterOnPremisesInstanceResult result = null; try { result = executeDeregisterOnPremisesInstance(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 getApplicationAsync(GetApplicationRequest request) { return getApplicationAsync(request, null); } @Override public java.util.concurrent.Future getApplicationAsync(final GetApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetApplicationResult call() throws Exception { GetApplicationResult result = null; try { result = executeGetApplication(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 getApplicationRevisionAsync(GetApplicationRevisionRequest request) { return getApplicationRevisionAsync(request, null); } @Override public java.util.concurrent.Future getApplicationRevisionAsync(final GetApplicationRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetApplicationRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetApplicationRevisionResult call() throws Exception { GetApplicationRevisionResult result = null; try { result = executeGetApplicationRevision(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 getDeploymentAsync(GetDeploymentRequest request) { return getDeploymentAsync(request, null); } @Override public java.util.concurrent.Future getDeploymentAsync(final GetDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeploymentResult call() throws Exception { GetDeploymentResult result = null; try { result = executeGetDeployment(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 getDeploymentConfigAsync(GetDeploymentConfigRequest request) { return getDeploymentConfigAsync(request, null); } @Override public java.util.concurrent.Future getDeploymentConfigAsync(final GetDeploymentConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeploymentConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeploymentConfigResult call() throws Exception { GetDeploymentConfigResult result = null; try { result = executeGetDeploymentConfig(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 getDeploymentGroupAsync(GetDeploymentGroupRequest request) { return getDeploymentGroupAsync(request, null); } @Override public java.util.concurrent.Future getDeploymentGroupAsync(final GetDeploymentGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeploymentGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeploymentGroupResult call() throws Exception { GetDeploymentGroupResult result = null; try { result = executeGetDeploymentGroup(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getDeploymentInstanceAsync(GetDeploymentInstanceRequest request) { return getDeploymentInstanceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getDeploymentInstanceAsync(final GetDeploymentInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeploymentInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeploymentInstanceResult call() throws Exception { GetDeploymentInstanceResult result = null; try { result = executeGetDeploymentInstance(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 getDeploymentTargetAsync(GetDeploymentTargetRequest request) { return getDeploymentTargetAsync(request, null); } @Override public java.util.concurrent.Future getDeploymentTargetAsync(final GetDeploymentTargetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeploymentTargetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeploymentTargetResult call() throws Exception { GetDeploymentTargetResult result = null; try { result = executeGetDeploymentTarget(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 getOnPremisesInstanceAsync(GetOnPremisesInstanceRequest request) { return getOnPremisesInstanceAsync(request, null); } @Override public java.util.concurrent.Future getOnPremisesInstanceAsync(final GetOnPremisesInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetOnPremisesInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetOnPremisesInstanceResult call() throws Exception { GetOnPremisesInstanceResult result = null; try { result = executeGetOnPremisesInstance(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 listApplicationRevisionsAsync(ListApplicationRevisionsRequest request) { return listApplicationRevisionsAsync(request, null); } @Override public java.util.concurrent.Future listApplicationRevisionsAsync(final ListApplicationRevisionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListApplicationRevisionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListApplicationRevisionsResult call() throws Exception { ListApplicationRevisionsResult result = null; try { result = executeListApplicationRevisions(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 listApplicationsAsync(ListApplicationsRequest request) { return listApplicationsAsync(request, null); } @Override public java.util.concurrent.Future listApplicationsAsync(final ListApplicationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListApplicationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListApplicationsResult call() throws Exception { ListApplicationsResult result = null; try { result = executeListApplications(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 ListApplications operation. * * @see #listApplicationsAsync(ListApplicationsRequest) */ @Override public java.util.concurrent.Future listApplicationsAsync() { return listApplicationsAsync(new ListApplicationsRequest()); } /** * Simplified method form for invoking the ListApplications operation with an AsyncHandler. * * @see #listApplicationsAsync(ListApplicationsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future listApplicationsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return listApplicationsAsync(new ListApplicationsRequest(), asyncHandler); } @Override public java.util.concurrent.Future listDeploymentConfigsAsync(ListDeploymentConfigsRequest request) { return listDeploymentConfigsAsync(request, null); } @Override public java.util.concurrent.Future listDeploymentConfigsAsync(final ListDeploymentConfigsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDeploymentConfigsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDeploymentConfigsResult call() throws Exception { ListDeploymentConfigsResult result = null; try { result = executeListDeploymentConfigs(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 ListDeploymentConfigs operation. * * @see #listDeploymentConfigsAsync(ListDeploymentConfigsRequest) */ @Override public java.util.concurrent.Future listDeploymentConfigsAsync() { return listDeploymentConfigsAsync(new ListDeploymentConfigsRequest()); } /** * Simplified method form for invoking the ListDeploymentConfigs operation with an AsyncHandler. * * @see #listDeploymentConfigsAsync(ListDeploymentConfigsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future listDeploymentConfigsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return listDeploymentConfigsAsync(new ListDeploymentConfigsRequest(), asyncHandler); } @Override public java.util.concurrent.Future listDeploymentGroupsAsync(ListDeploymentGroupsRequest request) { return listDeploymentGroupsAsync(request, null); } @Override public java.util.concurrent.Future listDeploymentGroupsAsync(final ListDeploymentGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDeploymentGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDeploymentGroupsResult call() throws Exception { ListDeploymentGroupsResult result = null; try { result = executeListDeploymentGroups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future listDeploymentInstancesAsync(ListDeploymentInstancesRequest request) { return listDeploymentInstancesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future listDeploymentInstancesAsync(final ListDeploymentInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDeploymentInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDeploymentInstancesResult call() throws Exception { ListDeploymentInstancesResult result = null; try { result = executeListDeploymentInstances(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 listDeploymentTargetsAsync(ListDeploymentTargetsRequest request) { return listDeploymentTargetsAsync(request, null); } @Override public java.util.concurrent.Future listDeploymentTargetsAsync(final ListDeploymentTargetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDeploymentTargetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDeploymentTargetsResult call() throws Exception { ListDeploymentTargetsResult result = null; try { result = executeListDeploymentTargets(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 listDeploymentsAsync(ListDeploymentsRequest request) { return listDeploymentsAsync(request, null); } @Override public java.util.concurrent.Future listDeploymentsAsync(final ListDeploymentsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDeploymentsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDeploymentsResult call() throws Exception { ListDeploymentsResult result = null; try { result = executeListDeployments(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 ListDeployments operation. * * @see #listDeploymentsAsync(ListDeploymentsRequest) */ @Override public java.util.concurrent.Future listDeploymentsAsync() { return listDeploymentsAsync(new ListDeploymentsRequest()); } /** * Simplified method form for invoking the ListDeployments operation with an AsyncHandler. * * @see #listDeploymentsAsync(ListDeploymentsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future listDeploymentsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return listDeploymentsAsync(new ListDeploymentsRequest(), asyncHandler); } @Override public java.util.concurrent.Future listGitHubAccountTokenNamesAsync(ListGitHubAccountTokenNamesRequest request) { return listGitHubAccountTokenNamesAsync(request, null); } @Override public java.util.concurrent.Future listGitHubAccountTokenNamesAsync(final ListGitHubAccountTokenNamesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListGitHubAccountTokenNamesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListGitHubAccountTokenNamesResult call() throws Exception { ListGitHubAccountTokenNamesResult result = null; try { result = executeListGitHubAccountTokenNames(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 listOnPremisesInstancesAsync(ListOnPremisesInstancesRequest request) { return listOnPremisesInstancesAsync(request, null); } @Override public java.util.concurrent.Future listOnPremisesInstancesAsync(final ListOnPremisesInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListOnPremisesInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListOnPremisesInstancesResult call() throws Exception { ListOnPremisesInstancesResult result = null; try { result = executeListOnPremisesInstances(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 ListOnPremisesInstances operation. * * @see #listOnPremisesInstancesAsync(ListOnPremisesInstancesRequest) */ @Override public java.util.concurrent.Future listOnPremisesInstancesAsync() { return listOnPremisesInstancesAsync(new ListOnPremisesInstancesRequest()); } /** * Simplified method form for invoking the ListOnPremisesInstances operation with an AsyncHandler. * * @see #listOnPremisesInstancesAsync(ListOnPremisesInstancesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future listOnPremisesInstancesAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return listOnPremisesInstancesAsync(new ListOnPremisesInstancesRequest(), asyncHandler); } @Override public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) { return listTagsForResourceAsync(request, null); } @Override public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTagsForResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTagsForResourceResult call() throws Exception { ListTagsForResourceResult result = null; try { result = executeListTagsForResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future putLifecycleEventHookExecutionStatusAsync( PutLifecycleEventHookExecutionStatusRequest request) { return putLifecycleEventHookExecutionStatusAsync(request, null); } @Override public java.util.concurrent.Future putLifecycleEventHookExecutionStatusAsync( final PutLifecycleEventHookExecutionStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutLifecycleEventHookExecutionStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutLifecycleEventHookExecutionStatusResult call() throws Exception { PutLifecycleEventHookExecutionStatusResult result = null; try { result = executePutLifecycleEventHookExecutionStatus(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 registerApplicationRevisionAsync(RegisterApplicationRevisionRequest request) { return registerApplicationRevisionAsync(request, null); } @Override public java.util.concurrent.Future registerApplicationRevisionAsync(final RegisterApplicationRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RegisterApplicationRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RegisterApplicationRevisionResult call() throws Exception { RegisterApplicationRevisionResult result = null; try { result = executeRegisterApplicationRevision(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 registerOnPremisesInstanceAsync(RegisterOnPremisesInstanceRequest request) { return registerOnPremisesInstanceAsync(request, null); } @Override public java.util.concurrent.Future registerOnPremisesInstanceAsync(final RegisterOnPremisesInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RegisterOnPremisesInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RegisterOnPremisesInstanceResult call() throws Exception { RegisterOnPremisesInstanceResult result = null; try { result = executeRegisterOnPremisesInstance(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 removeTagsFromOnPremisesInstancesAsync( RemoveTagsFromOnPremisesInstancesRequest request) { return removeTagsFromOnPremisesInstancesAsync(request, null); } @Override public java.util.concurrent.Future removeTagsFromOnPremisesInstancesAsync( final RemoveTagsFromOnPremisesInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveTagsFromOnPremisesInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveTagsFromOnPremisesInstancesResult call() throws Exception { RemoveTagsFromOnPremisesInstancesResult result = null; try { result = executeRemoveTagsFromOnPremisesInstances(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future skipWaitTimeForInstanceTerminationAsync( SkipWaitTimeForInstanceTerminationRequest request) { return skipWaitTimeForInstanceTerminationAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future skipWaitTimeForInstanceTerminationAsync( final SkipWaitTimeForInstanceTerminationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SkipWaitTimeForInstanceTerminationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SkipWaitTimeForInstanceTerminationResult call() throws Exception { SkipWaitTimeForInstanceTerminationResult result = null; try { result = executeSkipWaitTimeForInstanceTermination(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 stopDeploymentAsync(StopDeploymentRequest request) { return stopDeploymentAsync(request, null); } @Override public java.util.concurrent.Future stopDeploymentAsync(final StopDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopDeploymentResult call() throws Exception { StopDeploymentResult result = null; try { result = executeStopDeployment(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) { return tagResourceAsync(request, null); } @Override public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TagResourceResult call() throws Exception { TagResourceResult result = null; try { result = executeTagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) { return untagResourceAsync(request, null); } @Override public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UntagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UntagResourceResult call() throws Exception { UntagResourceResult result = null; try { result = executeUntagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateApplicationAsync(UpdateApplicationRequest request) { return updateApplicationAsync(request, null); } @Override public java.util.concurrent.Future updateApplicationAsync(final UpdateApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateApplicationResult call() throws Exception { UpdateApplicationResult result = null; try { result = executeUpdateApplication(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 UpdateApplication operation. * * @see #updateApplicationAsync(UpdateApplicationRequest) */ @Override public java.util.concurrent.Future updateApplicationAsync() { return updateApplicationAsync(new UpdateApplicationRequest()); } /** * Simplified method form for invoking the UpdateApplication operation with an AsyncHandler. * * @see #updateApplicationAsync(UpdateApplicationRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future updateApplicationAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return updateApplicationAsync(new UpdateApplicationRequest(), asyncHandler); } @Override public java.util.concurrent.Future updateDeploymentGroupAsync(UpdateDeploymentGroupRequest request) { return updateDeploymentGroupAsync(request, null); } @Override public java.util.concurrent.Future updateDeploymentGroupAsync(final UpdateDeploymentGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDeploymentGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDeploymentGroupResult call() throws Exception { UpdateDeploymentGroupResult result = null; try { result = executeUpdateDeploymentGroup(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