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

com.amazonaws.services.codepipeline.AWSCodePipelineAsyncClient Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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.codepipeline;

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

/**
 * Interface for accessing CodePipeline asynchronously. Each asynchronous method
 * will return a Java Future object representing the asynchronous operation;
 * overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

* AWS CodePipeline *

* Overview *

*

* This is the AWS CodePipeline API Reference. This guide provides descriptions * of the actions and data types for AWS CodePipeline. Some functionality for * your pipeline is only configurable through the API. For additional * information, see the AWS * CodePipeline User Guide. *

*

* You can use the AWS CodePipeline API to work with pipelines, stages, actions, * gates, and transitions, as described below. *

*

* Pipelines are models of automated release processes. Each pipeline is * uniquely named, and consists of actions, gates, and stages. *

*

* You can work with pipelines by calling: *

*
    *
  • *

    * CreatePipeline, which creates a uniquely-named pipeline. *

    *
  • *
  • *

    * DeletePipeline, which deletes the specified pipeline. *

    *
  • *
  • *

    * GetPipeline, which returns information about a pipeline structure. *

    *
  • *
  • *

    * GetPipelineState, which returns information about the current state of * the stages and actions of a pipeline. *

    *
  • *
  • *

    * ListPipelines, which gets a summary of all of the pipelines associated * with your account. *

    *
  • *
  • *

    * StartPipelineExecution, which runs the the most recent revision of an * artifact through the pipeline. *

    *
  • *
  • *

    * UpdatePipeline, which updates a pipeline with edits or changes to the * structure of the pipeline. *

    *
  • *
*

* Pipelines include stages, which are which are logical groupings of * gates and actions. Each stage contains one or more actions that must complete * before the next stage begins. A stage will result in success or failure. If a * stage fails, then the pipeline stops at that stage and will remain stopped * until either a new version of an artifact appears in the source location, or * a user takes action to re-run the most recent artifact through the pipeline. * You can call GetPipelineState, which displays the status of a * pipeline, including the status of stages in the pipeline, or * GetPipeline, which returns the entire structure of the pipeline, * including the stages of that pipeline. For more information about the * structure of stages and actions, also refer to the AWS CodePipeline Pipeline Structure Reference. *

*

* Pipeline stages include actions, which are categorized into categories * such as source or build actions performed within a stage of a pipeline. For * example, you can use a source action to import artifacts into a pipeline from * a source such as Amazon S3. Like stages, you do not work with actions * directly in most cases, but you do define and interact with actions when * working with pipeline operations such as CreatePipeline and * GetPipelineState. *

*

* Pipelines also include transitions, which allow the transition of * artifacts from one stage to the next in a pipeline after the actions in one * stage complete. *

*

* You can work with transitions by calling: *

*
    *
  • *

    * DisableStageTransition, which prevents artifacts from transitioning to * the next stage in a pipeline. *

    *
  • *
  • *

    * EnableStageTransition, which enables transition of artifacts between * stages in a pipeline. *

    *
  • *
*

* Using the API to integrate with AWS CodePipeline *

*

* For third-party integrators or developers who want to create their own * integrations with AWS CodePipeline, the expected sequence varies from the * standard API user. In order to integrate with AWS CodePipeline, developers * will need to work with the following items: *

*

* Jobs, which are instances of an action. For example, a job for a * source action might import a revision of an artifact from a source. *

*

* You can work with jobs by calling: *

*
    *
  • *

    * AcknowledgeJob, which confirms whether a job worker has received the * specified job, *

    *
  • *
  • *

    * GetJobDetails, which returns the details of a job, *

    *
  • *
  • *

    * PollForJobs, which determines whether there are any jobs to act upon, *

    *
  • *
  • *

    * PutJobFailureResult, which provides details of a job failure, and *

    *
  • *
  • *

    * PutJobSuccessResult, which provides details of a job success. *

    *
  • *
*

* Third party jobs, which are instances of an action created by a * partner action and integrated into AWS CodePipeline. Partner actions are * created by members of the AWS Partner Network. *

*

* You can work with third party jobs by calling: *

* */ @ThreadSafe public class AWSCodePipelineAsyncClient extends AWSCodePipelineClient implements AWSCodePipelineAsync { 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 * CodePipeline. 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) */ public AWSCodePipelineAsyncClient() { this(new com.amazonaws.auth.DefaultAWSCredentialsProviderChain()); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline. 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 CodePipeline (ex: proxy settings, retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) */ public AWSCodePipelineAsyncClient( com.amazonaws.ClientConfiguration clientConfiguration) { this(new com.amazonaws.auth.DefaultAWSCredentialsProviderChain(), clientConfiguration, java.util.concurrent.Executors .newFixedThreadPool(clientConfiguration .getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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) */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentials awsCredentials) { this(awsCredentials, java.util.concurrent.Executors .newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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. */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentials awsCredentials, java.util.concurrent.ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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. */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentials awsCredentials, com.amazonaws.ClientConfiguration clientConfiguration, java.util.concurrent.ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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) */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, java.util.concurrent.Executors .newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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) */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, java.util.concurrent.Executors .newFixedThreadPool(clientConfiguration .getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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. */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, java.util.concurrent.ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline 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. */ public AWSCodePipelineAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.ClientConfiguration clientConfiguration, java.util.concurrent.ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on * CodePipeline using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSCodePipelineAsyncClient(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 java.util.concurrent.ExecutorService getExecutorService() { return executorService; } @Override public java.util.concurrent.Future acknowledgeJobAsync( AcknowledgeJobRequest request) { return acknowledgeJobAsync(request, null); } @Override public java.util.concurrent.Future acknowledgeJobAsync( final AcknowledgeJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public AcknowledgeJobResult call() throws Exception { AcknowledgeJobResult result; try { result = acknowledgeJob(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future acknowledgeThirdPartyJobAsync( AcknowledgeThirdPartyJobRequest request) { return acknowledgeThirdPartyJobAsync(request, null); } @Override public java.util.concurrent.Future acknowledgeThirdPartyJobAsync( final AcknowledgeThirdPartyJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public AcknowledgeThirdPartyJobResult call() throws Exception { AcknowledgeThirdPartyJobResult result; try { result = acknowledgeThirdPartyJob(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future createCustomActionTypeAsync( CreateCustomActionTypeRequest request) { return createCustomActionTypeAsync(request, null); } @Override public java.util.concurrent.Future createCustomActionTypeAsync( final CreateCustomActionTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public CreateCustomActionTypeResult call() throws Exception { CreateCustomActionTypeResult result; try { result = createCustomActionType(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future createPipelineAsync( CreatePipelineRequest request) { return createPipelineAsync(request, null); } @Override public java.util.concurrent.Future createPipelineAsync( final CreatePipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public CreatePipelineResult call() throws Exception { CreatePipelineResult result; try { result = createPipeline(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future deleteCustomActionTypeAsync( DeleteCustomActionTypeRequest request) { return deleteCustomActionTypeAsync(request, null); } @Override public java.util.concurrent.Future deleteCustomActionTypeAsync( final DeleteCustomActionTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteCustomActionTypeResult call() throws Exception { DeleteCustomActionTypeResult result; try { result = deleteCustomActionType(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future deletePipelineAsync( DeletePipelineRequest request) { return deletePipelineAsync(request, null); } @Override public java.util.concurrent.Future deletePipelineAsync( final DeletePipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeletePipelineResult call() throws Exception { DeletePipelineResult result; try { result = deletePipeline(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future disableStageTransitionAsync( DisableStageTransitionRequest request) { return disableStageTransitionAsync(request, null); } @Override public java.util.concurrent.Future disableStageTransitionAsync( final DisableStageTransitionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DisableStageTransitionResult call() throws Exception { DisableStageTransitionResult result; try { result = disableStageTransition(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future enableStageTransitionAsync( EnableStageTransitionRequest request) { return enableStageTransitionAsync(request, null); } @Override public java.util.concurrent.Future enableStageTransitionAsync( final EnableStageTransitionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public EnableStageTransitionResult call() throws Exception { EnableStageTransitionResult result; try { result = enableStageTransition(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future getJobDetailsAsync( GetJobDetailsRequest request) { return getJobDetailsAsync(request, null); } @Override public java.util.concurrent.Future getJobDetailsAsync( final GetJobDetailsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public GetJobDetailsResult call() throws Exception { GetJobDetailsResult result; try { result = getJobDetails(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future getPipelineAsync( GetPipelineRequest request) { return getPipelineAsync(request, null); } @Override public java.util.concurrent.Future getPipelineAsync( final GetPipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public GetPipelineResult call() throws Exception { GetPipelineResult result; try { result = getPipeline(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future getPipelineStateAsync( GetPipelineStateRequest request) { return getPipelineStateAsync(request, null); } @Override public java.util.concurrent.Future getPipelineStateAsync( final GetPipelineStateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public GetPipelineStateResult call() throws Exception { GetPipelineStateResult result; try { result = getPipelineState(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future getThirdPartyJobDetailsAsync( GetThirdPartyJobDetailsRequest request) { return getThirdPartyJobDetailsAsync(request, null); } @Override public java.util.concurrent.Future getThirdPartyJobDetailsAsync( final GetThirdPartyJobDetailsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public GetThirdPartyJobDetailsResult call() throws Exception { GetThirdPartyJobDetailsResult result; try { result = getThirdPartyJobDetails(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future listActionTypesAsync( ListActionTypesRequest request) { return listActionTypesAsync(request, null); } @Override public java.util.concurrent.Future listActionTypesAsync( final ListActionTypesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ListActionTypesResult call() throws Exception { ListActionTypesResult result; try { result = listActionTypes(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future listPipelinesAsync( ListPipelinesRequest request) { return listPipelinesAsync(request, null); } @Override public java.util.concurrent.Future listPipelinesAsync( final ListPipelinesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ListPipelinesResult call() throws Exception { ListPipelinesResult result; try { result = listPipelines(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future pollForJobsAsync( PollForJobsRequest request) { return pollForJobsAsync(request, null); } @Override public java.util.concurrent.Future pollForJobsAsync( final PollForJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PollForJobsResult call() throws Exception { PollForJobsResult result; try { result = pollForJobs(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future pollForThirdPartyJobsAsync( PollForThirdPartyJobsRequest request) { return pollForThirdPartyJobsAsync(request, null); } @Override public java.util.concurrent.Future pollForThirdPartyJobsAsync( final PollForThirdPartyJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PollForThirdPartyJobsResult call() throws Exception { PollForThirdPartyJobsResult result; try { result = pollForThirdPartyJobs(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future putActionRevisionAsync( PutActionRevisionRequest request) { return putActionRevisionAsync(request, null); } @Override public java.util.concurrent.Future putActionRevisionAsync( final PutActionRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PutActionRevisionResult call() throws Exception { PutActionRevisionResult result; try { result = putActionRevision(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future putApprovalResultAsync( PutApprovalResultRequest request) { return putApprovalResultAsync(request, null); } @Override public java.util.concurrent.Future putApprovalResultAsync( final PutApprovalResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PutApprovalResultResult call() throws Exception { PutApprovalResultResult result; try { result = putApprovalResult(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future putJobFailureResultAsync( PutJobFailureResultRequest request) { return putJobFailureResultAsync(request, null); } @Override public java.util.concurrent.Future putJobFailureResultAsync( final PutJobFailureResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PutJobFailureResultResult call() throws Exception { PutJobFailureResultResult result; try { result = putJobFailureResult(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future putJobSuccessResultAsync( PutJobSuccessResultRequest request) { return putJobSuccessResultAsync(request, null); } @Override public java.util.concurrent.Future putJobSuccessResultAsync( final PutJobSuccessResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PutJobSuccessResultResult call() throws Exception { PutJobSuccessResultResult result; try { result = putJobSuccessResult(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future putThirdPartyJobFailureResultAsync( PutThirdPartyJobFailureResultRequest request) { return putThirdPartyJobFailureResultAsync(request, null); } @Override public java.util.concurrent.Future putThirdPartyJobFailureResultAsync( final PutThirdPartyJobFailureResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PutThirdPartyJobFailureResultResult call() throws Exception { PutThirdPartyJobFailureResultResult result; try { result = putThirdPartyJobFailureResult(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future putThirdPartyJobSuccessResultAsync( PutThirdPartyJobSuccessResultRequest request) { return putThirdPartyJobSuccessResultAsync(request, null); } @Override public java.util.concurrent.Future putThirdPartyJobSuccessResultAsync( final PutThirdPartyJobSuccessResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public PutThirdPartyJobSuccessResultResult call() throws Exception { PutThirdPartyJobSuccessResultResult result; try { result = putThirdPartyJobSuccessResult(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future retryStageExecutionAsync( RetryStageExecutionRequest request) { return retryStageExecutionAsync(request, null); } @Override public java.util.concurrent.Future retryStageExecutionAsync( final RetryStageExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public RetryStageExecutionResult call() throws Exception { RetryStageExecutionResult result; try { result = retryStageExecution(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future startPipelineExecutionAsync( StartPipelineExecutionRequest request) { return startPipelineExecutionAsync(request, null); } @Override public java.util.concurrent.Future startPipelineExecutionAsync( final StartPipelineExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public StartPipelineExecutionResult call() throws Exception { StartPipelineExecutionResult result; try { result = startPipelineExecution(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, result); } return result; } }); } @Override public java.util.concurrent.Future updatePipelineAsync( UpdatePipelineRequest request) { return updatePipelineAsync(request, null); } @Override public java.util.concurrent.Future updatePipelineAsync( final UpdatePipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { return executorService .submit(new java.util.concurrent.Callable() { @Override public UpdatePipelineResult call() throws Exception { UpdatePipelineResult result; try { result = updatePipeline(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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