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 Java SDK for AWS CodePipeline module holds the client classes that are used for communicating with AWS CodePipeline

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2015-2020 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 static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.codepipeline.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 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 can only be configured through the API. For more information, see * the AWS CodePipeline User Guide. *

*

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

*

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

*

* 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 the pipeline structure and pipeline metadata, including the * pipeline Amazon Resource Name (ARN). *

    *
  • *
  • *

    * GetPipelineExecution, which returns information about a specific execution of a pipeline. *

    *
  • *
  • *

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

    *
  • *
  • *

    * ListActionExecutions, which returns action-level details for past executions. The details include full stage * and action-level details, including individual action duration, status, any errors that occurred during the * execution, and input and output artifact location details. *

    *
  • *
  • *

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

    *
  • *
  • *

    * ListPipelineExecutions, which gets a summary of the most recent executions for a pipeline. *

    *
  • *
  • *

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

    *
  • *
  • *

    * StopPipelineExecution, which stops the specified pipeline execution from continuing through the pipeline. *

    *
  • *
  • *

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

    *
  • *
*

* Pipelines include stages. Each stage contains one or more actions that must complete before the next stage * begins. A stage results in success or failure. If a stage fails, the pipeline stops at that stage and remains stopped * until either a new version of an artifact appears in the source location, or a user takes action to rerun 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, see * AWS CodePipeline Pipeline * Structure Reference. *

*

* Pipeline stages include actions that are categorized into categories such as source or build actions performed * in 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. Valid * action categories are: *

*
    *
  • *

    * Source *

    *
  • *
  • *

    * Build *

    *
  • *
  • *

    * Test *

    *
  • *
  • *

    * Deploy *

    *
  • *
  • *

    * Approval *

    *
  • *
  • *

    * Invoke *

    *
  • *
*

* 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. To integrate with AWS CodePipeline, developers 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 on. *

    *
  • *
  • *

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

    *
  • *
  • *

    * 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 @Generated("com.amazonaws:aws-java-sdk-code-generator") 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) * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#defaultClient()} */ @Deprecated public AWSCodePipelineAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * 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) * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSCodePipelineAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, 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) * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, 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. * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSCodePipelineAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentials awsCredentials, 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. * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSCodePipelineAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSCodePipelineAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, 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) * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, 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) * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSCodePipelineAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, 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. * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSCodePipelineAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentialsProvider awsCredentialsProvider, 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. * @deprecated use {@link AWSCodePipelineAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSCodePipelineAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSCodePipelineAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSCodePipelineAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AWSCodePipelineAsyncClientBuilder asyncBuilder() { return AWSCodePipelineAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on CodePipeline using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSCodePipelineAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on CodePipeline using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSCodePipelineAsyncClient(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 acknowledgeJobAsync(AcknowledgeJobRequest request) { return acknowledgeJobAsync(request, null); } @Override public java.util.concurrent.Future acknowledgeJobAsync(final AcknowledgeJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AcknowledgeJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AcknowledgeJobResult call() throws Exception { AcknowledgeJobResult result = null; try { result = executeAcknowledgeJob(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 acknowledgeThirdPartyJobAsync(AcknowledgeThirdPartyJobRequest request) { return acknowledgeThirdPartyJobAsync(request, null); } @Override public java.util.concurrent.Future acknowledgeThirdPartyJobAsync(final AcknowledgeThirdPartyJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AcknowledgeThirdPartyJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AcknowledgeThirdPartyJobResult call() throws Exception { AcknowledgeThirdPartyJobResult result = null; try { result = executeAcknowledgeThirdPartyJob(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 createCustomActionTypeAsync(CreateCustomActionTypeRequest request) { return createCustomActionTypeAsync(request, null); } @Override public java.util.concurrent.Future createCustomActionTypeAsync(final CreateCustomActionTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCustomActionTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCustomActionTypeResult call() throws Exception { CreateCustomActionTypeResult result = null; try { result = executeCreateCustomActionType(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 createPipelineAsync(CreatePipelineRequest request) { return createPipelineAsync(request, null); } @Override public java.util.concurrent.Future createPipelineAsync(final CreatePipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreatePipelineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreatePipelineResult call() throws Exception { CreatePipelineResult result = null; try { result = executeCreatePipeline(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 deleteCustomActionTypeAsync(DeleteCustomActionTypeRequest request) { return deleteCustomActionTypeAsync(request, null); } @Override public java.util.concurrent.Future deleteCustomActionTypeAsync(final DeleteCustomActionTypeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCustomActionTypeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCustomActionTypeResult call() throws Exception { DeleteCustomActionTypeResult result = null; try { result = executeDeleteCustomActionType(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 deletePipelineAsync(DeletePipelineRequest request) { return deletePipelineAsync(request, null); } @Override public java.util.concurrent.Future deletePipelineAsync(final DeletePipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePipelineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePipelineResult call() throws Exception { DeletePipelineResult result = null; try { result = executeDeletePipeline(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 deleteWebhookAsync(DeleteWebhookRequest request) { return deleteWebhookAsync(request, null); } @Override public java.util.concurrent.Future deleteWebhookAsync(final DeleteWebhookRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteWebhookRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteWebhookResult call() throws Exception { DeleteWebhookResult result = null; try { result = executeDeleteWebhook(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 deregisterWebhookWithThirdPartyAsync( DeregisterWebhookWithThirdPartyRequest request) { return deregisterWebhookWithThirdPartyAsync(request, null); } @Override public java.util.concurrent.Future deregisterWebhookWithThirdPartyAsync( final DeregisterWebhookWithThirdPartyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeregisterWebhookWithThirdPartyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeregisterWebhookWithThirdPartyResult call() throws Exception { DeregisterWebhookWithThirdPartyResult result = null; try { result = executeDeregisterWebhookWithThirdParty(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 disableStageTransitionAsync(DisableStageTransitionRequest request) { return disableStageTransitionAsync(request, null); } @Override public java.util.concurrent.Future disableStageTransitionAsync(final DisableStageTransitionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisableStageTransitionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisableStageTransitionResult call() throws Exception { DisableStageTransitionResult result = null; try { result = executeDisableStageTransition(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 enableStageTransitionAsync(EnableStageTransitionRequest request) { return enableStageTransitionAsync(request, null); } @Override public java.util.concurrent.Future enableStageTransitionAsync(final EnableStageTransitionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final EnableStageTransitionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EnableStageTransitionResult call() throws Exception { EnableStageTransitionResult result = null; try { result = executeEnableStageTransition(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 getJobDetailsAsync(GetJobDetailsRequest request) { return getJobDetailsAsync(request, null); } @Override public java.util.concurrent.Future getJobDetailsAsync(final GetJobDetailsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetJobDetailsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetJobDetailsResult call() throws Exception { GetJobDetailsResult result = null; try { result = executeGetJobDetails(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 getPipelineAsync(GetPipelineRequest request) { return getPipelineAsync(request, null); } @Override public java.util.concurrent.Future getPipelineAsync(final GetPipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPipelineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPipelineResult call() throws Exception { GetPipelineResult result = null; try { result = executeGetPipeline(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 getPipelineExecutionAsync(GetPipelineExecutionRequest request) { return getPipelineExecutionAsync(request, null); } @Override public java.util.concurrent.Future getPipelineExecutionAsync(final GetPipelineExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPipelineExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPipelineExecutionResult call() throws Exception { GetPipelineExecutionResult result = null; try { result = executeGetPipelineExecution(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 getPipelineStateAsync(GetPipelineStateRequest request) { return getPipelineStateAsync(request, null); } @Override public java.util.concurrent.Future getPipelineStateAsync(final GetPipelineStateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPipelineStateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPipelineStateResult call() throws Exception { GetPipelineStateResult result = null; try { result = executeGetPipelineState(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 getThirdPartyJobDetailsAsync(GetThirdPartyJobDetailsRequest request) { return getThirdPartyJobDetailsAsync(request, null); } @Override public java.util.concurrent.Future getThirdPartyJobDetailsAsync(final GetThirdPartyJobDetailsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetThirdPartyJobDetailsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetThirdPartyJobDetailsResult call() throws Exception { GetThirdPartyJobDetailsResult result = null; try { result = executeGetThirdPartyJobDetails(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 listActionExecutionsAsync(ListActionExecutionsRequest request) { return listActionExecutionsAsync(request, null); } @Override public java.util.concurrent.Future listActionExecutionsAsync(final ListActionExecutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListActionExecutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListActionExecutionsResult call() throws Exception { ListActionExecutionsResult result = null; try { result = executeListActionExecutions(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 listActionTypesAsync(ListActionTypesRequest request) { return listActionTypesAsync(request, null); } @Override public java.util.concurrent.Future listActionTypesAsync(final ListActionTypesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListActionTypesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListActionTypesResult call() throws Exception { ListActionTypesResult result = null; try { result = executeListActionTypes(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 listPipelineExecutionsAsync(ListPipelineExecutionsRequest request) { return listPipelineExecutionsAsync(request, null); } @Override public java.util.concurrent.Future listPipelineExecutionsAsync(final ListPipelineExecutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPipelineExecutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPipelineExecutionsResult call() throws Exception { ListPipelineExecutionsResult result = null; try { result = executeListPipelineExecutions(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 listPipelinesAsync(ListPipelinesRequest request) { return listPipelinesAsync(request, null); } @Override public java.util.concurrent.Future listPipelinesAsync(final ListPipelinesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPipelinesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPipelinesResult call() throws Exception { ListPipelinesResult result = null; try { result = executeListPipelines(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) { return listTagsForResourceAsync(request, null); } @Override public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTagsForResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTagsForResourceResult call() throws Exception { ListTagsForResourceResult result = null; try { result = executeListTagsForResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listWebhooksAsync(ListWebhooksRequest request) { return listWebhooksAsync(request, null); } @Override public java.util.concurrent.Future listWebhooksAsync(final ListWebhooksRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListWebhooksRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListWebhooksResult call() throws Exception { ListWebhooksResult result = null; try { result = executeListWebhooks(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 pollForJobsAsync(PollForJobsRequest request) { return pollForJobsAsync(request, null); } @Override public java.util.concurrent.Future pollForJobsAsync(final PollForJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PollForJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PollForJobsResult call() throws Exception { PollForJobsResult result = null; try { result = executePollForJobs(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 pollForThirdPartyJobsAsync(PollForThirdPartyJobsRequest request) { return pollForThirdPartyJobsAsync(request, null); } @Override public java.util.concurrent.Future pollForThirdPartyJobsAsync(final PollForThirdPartyJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PollForThirdPartyJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PollForThirdPartyJobsResult call() throws Exception { PollForThirdPartyJobsResult result = null; try { result = executePollForThirdPartyJobs(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 putActionRevisionAsync(PutActionRevisionRequest request) { return putActionRevisionAsync(request, null); } @Override public java.util.concurrent.Future putActionRevisionAsync(final PutActionRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutActionRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutActionRevisionResult call() throws Exception { PutActionRevisionResult result = null; try { result = executePutActionRevision(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 putApprovalResultAsync(PutApprovalResultRequest request) { return putApprovalResultAsync(request, null); } @Override public java.util.concurrent.Future putApprovalResultAsync(final PutApprovalResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutApprovalResultRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutApprovalResultResult call() throws Exception { PutApprovalResultResult result = null; try { result = executePutApprovalResult(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 putJobFailureResultAsync(PutJobFailureResultRequest request) { return putJobFailureResultAsync(request, null); } @Override public java.util.concurrent.Future putJobFailureResultAsync(final PutJobFailureResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutJobFailureResultRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutJobFailureResultResult call() throws Exception { PutJobFailureResultResult result = null; try { result = executePutJobFailureResult(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 putJobSuccessResultAsync(PutJobSuccessResultRequest request) { return putJobSuccessResultAsync(request, null); } @Override public java.util.concurrent.Future putJobSuccessResultAsync(final PutJobSuccessResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutJobSuccessResultRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutJobSuccessResultResult call() throws Exception { PutJobSuccessResultResult result = null; try { result = executePutJobSuccessResult(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 putThirdPartyJobFailureResultAsync(PutThirdPartyJobFailureResultRequest request) { return putThirdPartyJobFailureResultAsync(request, null); } @Override public java.util.concurrent.Future putThirdPartyJobFailureResultAsync( final PutThirdPartyJobFailureResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutThirdPartyJobFailureResultRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutThirdPartyJobFailureResultResult call() throws Exception { PutThirdPartyJobFailureResultResult result = null; try { result = executePutThirdPartyJobFailureResult(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 putThirdPartyJobSuccessResultAsync(PutThirdPartyJobSuccessResultRequest request) { return putThirdPartyJobSuccessResultAsync(request, null); } @Override public java.util.concurrent.Future putThirdPartyJobSuccessResultAsync( final PutThirdPartyJobSuccessResultRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutThirdPartyJobSuccessResultRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutThirdPartyJobSuccessResultResult call() throws Exception { PutThirdPartyJobSuccessResultResult result = null; try { result = executePutThirdPartyJobSuccessResult(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 putWebhookAsync(PutWebhookRequest request) { return putWebhookAsync(request, null); } @Override public java.util.concurrent.Future putWebhookAsync(final PutWebhookRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutWebhookRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutWebhookResult call() throws Exception { PutWebhookResult result = null; try { result = executePutWebhook(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 registerWebhookWithThirdPartyAsync(RegisterWebhookWithThirdPartyRequest request) { return registerWebhookWithThirdPartyAsync(request, null); } @Override public java.util.concurrent.Future registerWebhookWithThirdPartyAsync( final RegisterWebhookWithThirdPartyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RegisterWebhookWithThirdPartyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RegisterWebhookWithThirdPartyResult call() throws Exception { RegisterWebhookWithThirdPartyResult result = null; try { result = executeRegisterWebhookWithThirdParty(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 retryStageExecutionAsync(RetryStageExecutionRequest request) { return retryStageExecutionAsync(request, null); } @Override public java.util.concurrent.Future retryStageExecutionAsync(final RetryStageExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RetryStageExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RetryStageExecutionResult call() throws Exception { RetryStageExecutionResult result = null; try { result = executeRetryStageExecution(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 startPipelineExecutionAsync(StartPipelineExecutionRequest request) { return startPipelineExecutionAsync(request, null); } @Override public java.util.concurrent.Future startPipelineExecutionAsync(final StartPipelineExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartPipelineExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartPipelineExecutionResult call() throws Exception { StartPipelineExecutionResult result = null; try { result = executeStartPipelineExecution(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 stopPipelineExecutionAsync(StopPipelineExecutionRequest request) { return stopPipelineExecutionAsync(request, null); } @Override public java.util.concurrent.Future stopPipelineExecutionAsync(final StopPipelineExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopPipelineExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopPipelineExecutionResult call() throws Exception { StopPipelineExecutionResult result = null; try { result = executeStopPipelineExecution(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 updatePipelineAsync(UpdatePipelineRequest request) { return updatePipelineAsync(request, null); } @Override public java.util.concurrent.Future updatePipelineAsync(final UpdatePipelineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdatePipelineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdatePipelineResult call() throws Exception { UpdatePipelineResult result = null; try { result = executeUpdatePipeline(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 - 2024 Weber Informatics LLC | Privacy Policy