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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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.
 * 

*

* AWS CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build * tools such as npm, Apache Maven, and pip. 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. *

*

* AWS CodeArtifact Components *

*

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

*
    *
  • *

    * 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 like the npm CLI, the Maven CLI ( mvn ), and pip * . *

    *
  • *
  • *

    * 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 AWS Key Management Service (AWS 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, and Maven package formats. *

    *

    * 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 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 supports these 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 *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * 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: *

    *
      *
    • *

      * npm *

      *
    • *
    • *

      * pypi *

      *
    • *
    • *

      * maven *

      *
    • *
    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

    * ListPackages: Lists the packages in a repository. *

    *
  • *
  • *

    * 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 AWS account that called this method. *

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
  • *

    * 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 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 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 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 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 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 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 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 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 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 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