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

com.amazonaws.services.codeartifact.AWSCodeArtifactAsyncClient Maven / Gradle / Ivy

Go to download

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

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

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing CodeArtifact 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.
 * 

*

* CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build tools * such as npm, Apache Maven, pip, and dotnet. You can use CodeArtifact to share packages with development teams and * pull packages. Packages can be pulled from both public and CodeArtifact repositories. You can also create an upstream * relationship between a CodeArtifact repository and another repository, which effectively merges their contents from * the point of view of a package manager client. *

*

* CodeArtifact concepts *

*
    *
  • *

    * Repository: A CodeArtifact repository contains a set of package * versions, each of which maps to a set of assets, or files. Repositories are polyglot, so a single repository can * contain packages of any supported type. Each repository exposes endpoints for fetching and publishing packages using * tools such as the npm CLI or the Maven CLI ( mvn ). For a list of supported * package managers, see the CodeArtifact User * Guide. *

    *
  • *
  • *

    * Domain: Repositories are aggregated into a higher-level entity known as a domain. All package assets * and metadata are stored in the domain, but are consumed through repositories. A given package asset, such as a Maven * JAR file, is stored once per domain, no matter how many repositories it's present in. All of the assets and metadata * in a domain are encrypted with the same customer master key (CMK) stored in Key Management Service (KMS). *

    *

    * Each repository is a member of a single domain and can't be moved to a different domain. *

    *

    * The domain allows organizational policy to be applied across multiple repositories, such as which accounts can access * repositories in the domain, and which public repositories can be used as sources of packages. *

    *

    * Although an organization can have multiple domains, we recommend a single production domain that contains all * published artifacts so that teams can find and share packages across their organization. *

    *
  • *
  • *

    * Package: A package is a bundle of software and the metadata required to resolve dependencies and * install the software. CodeArtifact supports npm, PyPI, Maven, NuGet, Swift, Ruby, Cargo, and generic package formats. * For more information about the supported package formats and how to use CodeArtifact with them, see the CodeArtifact User Guide. *

    *

    * In CodeArtifact, a package consists of: *

    *
      *
    • *

      * A name (for example, webpack is the name of a popular npm package) *

      *
    • *
    • *

      * An optional namespace (for example, @types in @types/node) *

      *
    • *
    • *

      * A set of versions (for example, 1.0.0, 1.0.1, 1.0.2, etc.) *

      *
    • *
    • *

      * Package-level metadata (for example, npm tags) *

      *
    • *
    *
  • *
  • *

    * Package group: A group of packages that match a specified definition. Package groups can be used to apply * configuration to multiple packages that match a defined pattern using package format, package namespace, and package * name. You can use package groups to more conveniently configure package origin controls for multiple packages. * Package origin controls are used to block or allow ingestion or publishing of new package versions, which protects * users from malicious actions known as dependency substitution attacks. *

    *
  • *
  • *

    * Package version: A version of a package, such as @types/node 12.6.9. The version number format * and semantics vary for different package formats. For example, npm package versions must conform to the Semantic Versioning specification. In CodeArtifact, a package version consists of the * version identifier, metadata at the package version level, and a set of assets. *

    *
  • *
  • *

    * Upstream repository: One repository is upstream of another when the package versions in it can be * accessed from the repository endpoint of the downstream repository, effectively merging the contents of the two * repositories from the point of view of a client. CodeArtifact allows creating an upstream relationship between two * repositories. *

    *
  • *
  • *

    * Asset: An individual file stored in CodeArtifact associated with a package version, such as an npm * .tgz file or Maven POM and JAR files. *

    *
  • *
*

* CodeArtifact supported API operations *

*
    *
  • *

    * AssociateExternalConnection: Adds an existing external connection to a repository. *

    *
  • *
  • *

    * CopyPackageVersions: Copies package versions from one repository to another repository in the same * domain. *

    *
  • *
  • *

    * CreateDomain: Creates a domain. *

    *
  • *
  • *

    * CreatePackageGroup: Creates a package group. *

    *
  • *
  • *

    * CreateRepository: Creates a CodeArtifact repository in a domain. *

    *
  • *
  • *

    * DeleteDomain: Deletes a domain. You cannot delete a domain that contains repositories. *

    *
  • *
  • *

    * DeleteDomainPermissionsPolicy: Deletes the resource policy that is set on a domain. *

    *
  • *
  • *

    * DeletePackage: Deletes a package and all associated package versions. *

    *
  • *
  • *

    * DeletePackageGroup: Deletes a package group. Does not delete packages or package versions that are * associated with a package group. *

    *
  • *
  • *

    * DeletePackageVersions: Deletes versions of a package. After a package has been deleted, it can be * republished, but its assets and metadata cannot be restored because they have been permanently removed from storage. *

    *
  • *
  • *

    * DeleteRepository: Deletes a repository. *

    *
  • *
  • *

    * DeleteRepositoryPermissionsPolicy: Deletes the resource policy that is set on a repository. *

    *
  • *
  • *

    * DescribeDomain: Returns a DomainDescription object that contains information about the * requested domain. *

    *
  • *
  • *

    * DescribePackage: Returns a PackageDescription object that contains details about a package. *

    *
  • *
  • *

    * DescribePackageGroup: Returns a PackageGroup object * that contains details about a package group. *

    *
  • *
  • *

    * DescribePackageVersion: Returns a PackageVersionDescription object that contains details about a package version. *

    *
  • *
  • *

    * DescribeRepository: Returns a RepositoryDescription object that contains detailed * information about the requested repository. *

    *
  • *
  • *

    * DisposePackageVersions: Disposes versions of a package. A package version with the status * Disposed cannot be restored because they have been permanently removed from storage. *

    *
  • *
  • *

    * DisassociateExternalConnection: Removes an existing external connection from a repository. *

    *
  • *
  • *

    * GetAssociatedPackageGroup: Returns the most closely associated package group to the specified package. *

    *
  • *
  • *

    * GetAuthorizationToken: Generates a temporary authorization token for accessing repositories in the * domain. The token expires the authorization period has passed. The default authorization period is 12 hours and can * be customized to any length with a maximum of 12 hours. *

    *
  • *
  • *

    * GetDomainPermissionsPolicy: Returns the policy of a resource that is attached to the specified domain. *

    *
  • *
  • *

    * GetPackageVersionAsset: Returns the contents of an asset that is in a package version. *

    *
  • *
  • *

    * GetPackageVersionReadme: Gets the readme file or descriptive text for a package version. *

    *
  • *
  • *

    * GetRepositoryEndpoint: Returns the endpoint of a repository for a specific package format. A repository * has one endpoint for each package format: *

    *
      *
    • *

      * cargo *

      *
    • *
    • *

      * generic *

      *
    • *
    • *

      * maven *

      *
    • *
    • *

      * npm *

      *
    • *
    • *

      * nuget *

      *
    • *
    • *

      * pypi *

      *
    • *
    • *

      * ruby *

      *
    • *
    • *

      * swift *

      *
    • *
    *
  • *
  • *

    * GetRepositoryPermissionsPolicy: Returns the resource policy that is set on a repository. *

    *
  • *
  • *

    * ListAllowedRepositoriesForGroup: Lists the allowed repositories for a package group that has origin * configuration set to ALLOW_SPECIFIC_REPOSITORIES. *

    *
  • *
  • *

    * ListAssociatedPackages: Returns a list of packages associated with the requested package group. *

    *
  • *
  • *

    * ListDomains: Returns a list of DomainSummary objects. Each returned * DomainSummary object contains information about a domain. *

    *
  • *
  • *

    * ListPackages: Lists the packages in a repository. *

    *
  • *
  • *

    * ListPackageGroups: Returns a list of package groups in the requested domain. *

    *
  • *
  • *

    * ListPackageVersionAssets: Lists the assets for a given package version. *

    *
  • *
  • *

    * ListPackageVersionDependencies: Returns a list of the direct dependencies for a package version. *

    *
  • *
  • *

    * ListPackageVersions: Returns a list of package versions for a specified package in a repository. *

    *
  • *
  • *

    * ListRepositories: Returns a list of repositories owned by the Amazon Web Services account that called * this method. *

    *
  • *
  • *

    * ListRepositoriesInDomain: Returns a list of the repositories in a domain. *

    *
  • *
  • *

    * ListSubPackageGroups: Returns a list of direct children of the specified package group. *

    *
  • *
  • *

    * PublishPackageVersion: Creates a new package version containing one or more assets. *

    *
  • *
  • *

    * PutDomainPermissionsPolicy: Attaches a resource policy to a domain. *

    *
  • *
  • *

    * PutPackageOriginConfiguration: Sets the package origin configuration for a package, which determine how * new versions of the package can be added to a specific repository. *

    *
  • *
  • *

    * PutRepositoryPermissionsPolicy: Sets the resource policy on a repository that specifies permissions to * access it. *

    *
  • *
  • *

    * UpdatePackageGroup: Updates a package group. This API cannot be used to update a package group's origin * configuration or pattern. *

    *
  • *
  • *

    * UpdatePackageGroupOriginConfiguration: Updates the package origin configuration for a package group. *

    *
  • *
  • *

    * UpdatePackageVersionsStatus: Updates the status of one or more versions of a package. *

    *
  • *
  • *

    * UpdateRepository: Updates the properties of a repository. *

    *
  • *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSCodeArtifactAsyncClient extends AWSCodeArtifactClient implements AWSCodeArtifactAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSCodeArtifactAsyncClientBuilder asyncBuilder() { return AWSCodeArtifactAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on CodeArtifact using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSCodeArtifactAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on CodeArtifact using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSCodeArtifactAsyncClient(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 associateExternalConnectionAsync(AssociateExternalConnectionRequest request) { return associateExternalConnectionAsync(request, null); } @Override public java.util.concurrent.Future associateExternalConnectionAsync(final AssociateExternalConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateExternalConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateExternalConnectionResult call() throws Exception { AssociateExternalConnectionResult result = null; try { result = executeAssociateExternalConnection(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 copyPackageVersionsAsync(CopyPackageVersionsRequest request) { return copyPackageVersionsAsync(request, null); } @Override public java.util.concurrent.Future copyPackageVersionsAsync(final CopyPackageVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopyPackageVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CopyPackageVersionsResult call() throws Exception { CopyPackageVersionsResult result = null; try { result = executeCopyPackageVersions(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 createDomainAsync(CreateDomainRequest request) { return createDomainAsync(request, null); } @Override public java.util.concurrent.Future createDomainAsync(final CreateDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDomainResult call() throws Exception { CreateDomainResult result = null; try { result = executeCreateDomain(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 createPackageGroupAsync(CreatePackageGroupRequest request) { return createPackageGroupAsync(request, null); } @Override public java.util.concurrent.Future createPackageGroupAsync(final CreatePackageGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreatePackageGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreatePackageGroupResult call() throws Exception { CreatePackageGroupResult result = null; try { result = executeCreatePackageGroup(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 createRepositoryAsync(CreateRepositoryRequest request) { return createRepositoryAsync(request, null); } @Override public java.util.concurrent.Future createRepositoryAsync(final CreateRepositoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRepositoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRepositoryResult call() throws Exception { CreateRepositoryResult result = null; try { result = executeCreateRepository(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 deleteDomainAsync(DeleteDomainRequest request) { return deleteDomainAsync(request, null); } @Override public java.util.concurrent.Future deleteDomainAsync(final DeleteDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDomainResult call() throws Exception { DeleteDomainResult result = null; try { result = executeDeleteDomain(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 deleteDomainPermissionsPolicyAsync(DeleteDomainPermissionsPolicyRequest request) { return deleteDomainPermissionsPolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteDomainPermissionsPolicyAsync( final DeleteDomainPermissionsPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDomainPermissionsPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDomainPermissionsPolicyResult call() throws Exception { DeleteDomainPermissionsPolicyResult result = null; try { result = executeDeleteDomainPermissionsPolicy(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 deletePackageAsync(DeletePackageRequest request) { return deletePackageAsync(request, null); } @Override public java.util.concurrent.Future deletePackageAsync(final DeletePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePackageResult call() throws Exception { DeletePackageResult result = null; try { result = executeDeletePackage(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 deletePackageGroupAsync(DeletePackageGroupRequest request) { return deletePackageGroupAsync(request, null); } @Override public java.util.concurrent.Future deletePackageGroupAsync(final DeletePackageGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePackageGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePackageGroupResult call() throws Exception { DeletePackageGroupResult result = null; try { result = executeDeletePackageGroup(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 deletePackageVersionsAsync(DeletePackageVersionsRequest request) { return deletePackageVersionsAsync(request, null); } @Override public java.util.concurrent.Future deletePackageVersionsAsync(final DeletePackageVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePackageVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePackageVersionsResult call() throws Exception { DeletePackageVersionsResult result = null; try { result = executeDeletePackageVersions(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 deleteRepositoryAsync(DeleteRepositoryRequest request) { return deleteRepositoryAsync(request, null); } @Override public java.util.concurrent.Future deleteRepositoryAsync(final DeleteRepositoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRepositoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRepositoryResult call() throws Exception { DeleteRepositoryResult result = null; try { result = executeDeleteRepository(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 deleteRepositoryPermissionsPolicyAsync( DeleteRepositoryPermissionsPolicyRequest request) { return deleteRepositoryPermissionsPolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteRepositoryPermissionsPolicyAsync( final DeleteRepositoryPermissionsPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRepositoryPermissionsPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRepositoryPermissionsPolicyResult call() throws Exception { DeleteRepositoryPermissionsPolicyResult result = null; try { result = executeDeleteRepositoryPermissionsPolicy(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 describeDomainAsync(DescribeDomainRequest request) { return describeDomainAsync(request, null); } @Override public java.util.concurrent.Future describeDomainAsync(final DescribeDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDomainResult call() throws Exception { DescribeDomainResult result = null; try { result = executeDescribeDomain(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 describePackageAsync(DescribePackageRequest request) { return describePackageAsync(request, null); } @Override public java.util.concurrent.Future describePackageAsync(final DescribePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePackageResult call() throws Exception { DescribePackageResult result = null; try { result = executeDescribePackage(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 describePackageGroupAsync(DescribePackageGroupRequest request) { return describePackageGroupAsync(request, null); } @Override public java.util.concurrent.Future describePackageGroupAsync(final DescribePackageGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePackageGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePackageGroupResult call() throws Exception { DescribePackageGroupResult result = null; try { result = executeDescribePackageGroup(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 describePackageVersionAsync(DescribePackageVersionRequest request) { return describePackageVersionAsync(request, null); } @Override public java.util.concurrent.Future describePackageVersionAsync(final DescribePackageVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePackageVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePackageVersionResult call() throws Exception { DescribePackageVersionResult result = null; try { result = executeDescribePackageVersion(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 describeRepositoryAsync(DescribeRepositoryRequest request) { return describeRepositoryAsync(request, null); } @Override public java.util.concurrent.Future describeRepositoryAsync(final DescribeRepositoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRepositoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRepositoryResult call() throws Exception { DescribeRepositoryResult result = null; try { result = executeDescribeRepository(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 disassociateExternalConnectionAsync(DisassociateExternalConnectionRequest request) { return disassociateExternalConnectionAsync(request, null); } @Override public java.util.concurrent.Future disassociateExternalConnectionAsync( final DisassociateExternalConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateExternalConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateExternalConnectionResult call() throws Exception { DisassociateExternalConnectionResult result = null; try { result = executeDisassociateExternalConnection(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 disposePackageVersionsAsync(DisposePackageVersionsRequest request) { return disposePackageVersionsAsync(request, null); } @Override public java.util.concurrent.Future disposePackageVersionsAsync(final DisposePackageVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisposePackageVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisposePackageVersionsResult call() throws Exception { DisposePackageVersionsResult result = null; try { result = executeDisposePackageVersions(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 getAssociatedPackageGroupAsync(GetAssociatedPackageGroupRequest request) { return getAssociatedPackageGroupAsync(request, null); } @Override public java.util.concurrent.Future getAssociatedPackageGroupAsync(final GetAssociatedPackageGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAssociatedPackageGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAssociatedPackageGroupResult call() throws Exception { GetAssociatedPackageGroupResult result = null; try { result = executeGetAssociatedPackageGroup(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 getAuthorizationTokenAsync(GetAuthorizationTokenRequest request) { return getAuthorizationTokenAsync(request, null); } @Override public java.util.concurrent.Future getAuthorizationTokenAsync(final GetAuthorizationTokenRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAuthorizationTokenRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAuthorizationTokenResult call() throws Exception { GetAuthorizationTokenResult result = null; try { result = executeGetAuthorizationToken(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 getDomainPermissionsPolicyAsync(GetDomainPermissionsPolicyRequest request) { return getDomainPermissionsPolicyAsync(request, null); } @Override public java.util.concurrent.Future getDomainPermissionsPolicyAsync(final GetDomainPermissionsPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDomainPermissionsPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDomainPermissionsPolicyResult call() throws Exception { GetDomainPermissionsPolicyResult result = null; try { result = executeGetDomainPermissionsPolicy(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 getPackageVersionAssetAsync(GetPackageVersionAssetRequest request) { return getPackageVersionAssetAsync(request, null); } @Override public java.util.concurrent.Future getPackageVersionAssetAsync(final GetPackageVersionAssetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPackageVersionAssetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPackageVersionAssetResult call() throws Exception { GetPackageVersionAssetResult result = null; try { result = executeGetPackageVersionAsset(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 getPackageVersionReadmeAsync(GetPackageVersionReadmeRequest request) { return getPackageVersionReadmeAsync(request, null); } @Override public java.util.concurrent.Future getPackageVersionReadmeAsync(final GetPackageVersionReadmeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPackageVersionReadmeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPackageVersionReadmeResult call() throws Exception { GetPackageVersionReadmeResult result = null; try { result = executeGetPackageVersionReadme(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 getRepositoryEndpointAsync(GetRepositoryEndpointRequest request) { return getRepositoryEndpointAsync(request, null); } @Override public java.util.concurrent.Future getRepositoryEndpointAsync(final GetRepositoryEndpointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRepositoryEndpointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRepositoryEndpointResult call() throws Exception { GetRepositoryEndpointResult result = null; try { result = executeGetRepositoryEndpoint(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 getRepositoryPermissionsPolicyAsync(GetRepositoryPermissionsPolicyRequest request) { return getRepositoryPermissionsPolicyAsync(request, null); } @Override public java.util.concurrent.Future getRepositoryPermissionsPolicyAsync( final GetRepositoryPermissionsPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRepositoryPermissionsPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRepositoryPermissionsPolicyResult call() throws Exception { GetRepositoryPermissionsPolicyResult result = null; try { result = executeGetRepositoryPermissionsPolicy(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 listAllowedRepositoriesForGroupAsync( ListAllowedRepositoriesForGroupRequest request) { return listAllowedRepositoriesForGroupAsync(request, null); } @Override public java.util.concurrent.Future listAllowedRepositoriesForGroupAsync( final ListAllowedRepositoriesForGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAllowedRepositoriesForGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAllowedRepositoriesForGroupResult call() throws Exception { ListAllowedRepositoriesForGroupResult result = null; try { result = executeListAllowedRepositoriesForGroup(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 listAssociatedPackagesAsync(ListAssociatedPackagesRequest request) { return listAssociatedPackagesAsync(request, null); } @Override public java.util.concurrent.Future listAssociatedPackagesAsync(final ListAssociatedPackagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAssociatedPackagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAssociatedPackagesResult call() throws Exception { ListAssociatedPackagesResult result = null; try { result = executeListAssociatedPackages(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 listDomainsAsync(ListDomainsRequest request) { return listDomainsAsync(request, null); } @Override public java.util.concurrent.Future listDomainsAsync(final ListDomainsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDomainsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDomainsResult call() throws Exception { ListDomainsResult result = null; try { result = executeListDomains(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 listPackageGroupsAsync(ListPackageGroupsRequest request) { return listPackageGroupsAsync(request, null); } @Override public java.util.concurrent.Future listPackageGroupsAsync(final ListPackageGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPackageGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPackageGroupsResult call() throws Exception { ListPackageGroupsResult result = null; try { result = executeListPackageGroups(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 listPackageVersionAssetsAsync(ListPackageVersionAssetsRequest request) { return listPackageVersionAssetsAsync(request, null); } @Override public java.util.concurrent.Future listPackageVersionAssetsAsync(final ListPackageVersionAssetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPackageVersionAssetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPackageVersionAssetsResult call() throws Exception { ListPackageVersionAssetsResult result = null; try { result = executeListPackageVersionAssets(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 listPackageVersionDependenciesAsync(ListPackageVersionDependenciesRequest request) { return listPackageVersionDependenciesAsync(request, null); } @Override public java.util.concurrent.Future listPackageVersionDependenciesAsync( final ListPackageVersionDependenciesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPackageVersionDependenciesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPackageVersionDependenciesResult call() throws Exception { ListPackageVersionDependenciesResult result = null; try { result = executeListPackageVersionDependencies(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 listPackageVersionsAsync(ListPackageVersionsRequest request) { return listPackageVersionsAsync(request, null); } @Override public java.util.concurrent.Future listPackageVersionsAsync(final ListPackageVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPackageVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPackageVersionsResult call() throws Exception { ListPackageVersionsResult result = null; try { result = executeListPackageVersions(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 listPackagesAsync(ListPackagesRequest request) { return listPackagesAsync(request, null); } @Override public java.util.concurrent.Future listPackagesAsync(final ListPackagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPackagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPackagesResult call() throws Exception { ListPackagesResult result = null; try { result = executeListPackages(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 listRepositoriesAsync(ListRepositoriesRequest request) { return listRepositoriesAsync(request, null); } @Override public java.util.concurrent.Future listRepositoriesAsync(final ListRepositoriesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRepositoriesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRepositoriesResult call() throws Exception { ListRepositoriesResult result = null; try { result = executeListRepositories(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 listRepositoriesInDomainAsync(ListRepositoriesInDomainRequest request) { return listRepositoriesInDomainAsync(request, null); } @Override public java.util.concurrent.Future listRepositoriesInDomainAsync(final ListRepositoriesInDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRepositoriesInDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRepositoriesInDomainResult call() throws Exception { ListRepositoriesInDomainResult result = null; try { result = executeListRepositoriesInDomain(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 listSubPackageGroupsAsync(ListSubPackageGroupsRequest request) { return listSubPackageGroupsAsync(request, null); } @Override public java.util.concurrent.Future listSubPackageGroupsAsync(final ListSubPackageGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSubPackageGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSubPackageGroupsResult call() throws Exception { ListSubPackageGroupsResult result = null; try { result = executeListSubPackageGroups(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 publishPackageVersionAsync(PublishPackageVersionRequest request) { return publishPackageVersionAsync(request, null); } @Override public java.util.concurrent.Future publishPackageVersionAsync(final PublishPackageVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PublishPackageVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PublishPackageVersionResult call() throws Exception { PublishPackageVersionResult result = null; try { result = executePublishPackageVersion(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 putDomainPermissionsPolicyAsync(PutDomainPermissionsPolicyRequest request) { return putDomainPermissionsPolicyAsync(request, null); } @Override public java.util.concurrent.Future putDomainPermissionsPolicyAsync(final PutDomainPermissionsPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutDomainPermissionsPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutDomainPermissionsPolicyResult call() throws Exception { PutDomainPermissionsPolicyResult result = null; try { result = executePutDomainPermissionsPolicy(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 putPackageOriginConfigurationAsync(PutPackageOriginConfigurationRequest request) { return putPackageOriginConfigurationAsync(request, null); } @Override public java.util.concurrent.Future putPackageOriginConfigurationAsync( final PutPackageOriginConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutPackageOriginConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutPackageOriginConfigurationResult call() throws Exception { PutPackageOriginConfigurationResult result = null; try { result = executePutPackageOriginConfiguration(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 putRepositoryPermissionsPolicyAsync(PutRepositoryPermissionsPolicyRequest request) { return putRepositoryPermissionsPolicyAsync(request, null); } @Override public java.util.concurrent.Future putRepositoryPermissionsPolicyAsync( final PutRepositoryPermissionsPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutRepositoryPermissionsPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutRepositoryPermissionsPolicyResult call() throws Exception { PutRepositoryPermissionsPolicyResult result = null; try { result = executePutRepositoryPermissionsPolicy(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 updatePackageGroupAsync(UpdatePackageGroupRequest request) { return updatePackageGroupAsync(request, null); } @Override public java.util.concurrent.Future updatePackageGroupAsync(final UpdatePackageGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdatePackageGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdatePackageGroupResult call() throws Exception { UpdatePackageGroupResult result = null; try { result = executeUpdatePackageGroup(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 updatePackageGroupOriginConfigurationAsync( UpdatePackageGroupOriginConfigurationRequest request) { return updatePackageGroupOriginConfigurationAsync(request, null); } @Override public java.util.concurrent.Future updatePackageGroupOriginConfigurationAsync( final UpdatePackageGroupOriginConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdatePackageGroupOriginConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdatePackageGroupOriginConfigurationResult call() throws Exception { UpdatePackageGroupOriginConfigurationResult result = null; try { result = executeUpdatePackageGroupOriginConfiguration(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 updatePackageVersionsStatusAsync(UpdatePackageVersionsStatusRequest request) { return updatePackageVersionsStatusAsync(request, null); } @Override public java.util.concurrent.Future updatePackageVersionsStatusAsync(final UpdatePackageVersionsStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdatePackageVersionsStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdatePackageVersionsStatusResult call() throws Exception { UpdatePackageVersionsStatusResult result = null; try { result = executeUpdatePackageVersionsStatus(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 updateRepositoryAsync(UpdateRepositoryRequest request) { return updateRepositoryAsync(request, null); } @Override public java.util.concurrent.Future updateRepositoryAsync(final UpdateRepositoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRepositoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRepositoryResult call() throws Exception { UpdateRepositoryResult result = null; try { result = executeUpdateRepository(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