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

com.amazonaws.services.cloudfront_2012_03_15.AmazonCloudFrontAsyncClient Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright 2010-2014 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.cloudfront_2012_03_15;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateCloudFrontOriginAccessIdentityRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateCloudFrontOriginAccessIdentityResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateDistributionResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateInvalidationRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateInvalidationResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateStreamingDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.CreateStreamingDistributionResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.DeleteCloudFrontOriginAccessIdentityRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.DeleteDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.DeleteStreamingDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetCloudFrontOriginAccessIdentityConfigRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetCloudFrontOriginAccessIdentityConfigResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetCloudFrontOriginAccessIdentityRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetCloudFrontOriginAccessIdentityResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetDistributionConfigRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetDistributionConfigResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetDistributionResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetInvalidationRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetInvalidationResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetStreamingDistributionConfigRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetStreamingDistributionConfigResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetStreamingDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.GetStreamingDistributionResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListCloudFrontOriginAccessIdentitiesRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListCloudFrontOriginAccessIdentitiesResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListDistributionsRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListDistributionsResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListInvalidationsRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListInvalidationsResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListStreamingDistributionsRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.ListStreamingDistributionsResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.UpdateCloudFrontOriginAccessIdentityRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.UpdateCloudFrontOriginAccessIdentityResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.UpdateDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.UpdateDistributionResult;
import com.amazonaws.services.cloudfront_2012_03_15.model.UpdateStreamingDistributionRequest;
import com.amazonaws.services.cloudfront_2012_03_15.model.UpdateStreamingDistributionResult;


/**
 * Client for accessing AmazonCloudFront.  All calls made
 * using this client are non-blocking and will immediately return a Java Future.
 * Callers must use the Future object to determine when the service call has actually
 * completed.
 *
 * @deprecated The Amazon CloudFront client in this namespace uses an older API version.
 *             This client is available to help customers as they migrate to the new API version.
 */
@Deprecated
public class AmazonCloudFrontAsyncClient extends AmazonCloudFrontClient
        implements AmazonCloudFrontAsync {

    /**
     * Executor service for executing asynchronous requests.
     */
    private ExecutorService executorService;


    /**
     * Constructs a new asynchronous client to invoke service methods on
     * AmazonCloudFront using the specified AWS account credentials.
     * Default client settings will be used, and a default cached thread pool will be
     * created for executing the asynchronous tasks.
     *
     * 

* All calls made using this new client object are non-blocking, and will immediately * return a Java Future object that the caller can later check to see if the service * call has actually completed. * * @param awsCredentials The AWS credentials (access key ID and secret key) to use * when authenticating with AWS services. */ public AmazonCloudFrontAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, Executors.newCachedThreadPool()); } /** * Constructs a new asynchronous client to invoke service methods on * AmazonCloudFront using the specified AWS account credentials * and executor service. Default client settings will be used. * *

* All calls made using this new client object are non-blocking, and will immediately * return a Java Future object that the caller can later check to see if the service * call has actually completed. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use * when authenticating with AWS services. * @param executorService * The executor service by which all asynchronous requests will * be executed. */ public AmazonCloudFrontAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { super(awsCredentials); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on * AmazonCloudFront using the specified AWS account credentials, * executor service, and client configuration options. * *

* All calls made using this new client object are non-blocking, and will immediately * return a Java Future object that the caller can later check to see if the service * call has actually completed. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use * when authenticating with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy * settings, etc). * @param executorService * The executor service by which all asynchronous requests will * be executed. */ public AmazonCloudFrontAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on * AmazonCloudFront using the specified AWS account credentials provider. * Default client settings will be used, and a default cached thread pool will be * created for executing the asynchronous tasks. * *

* All calls made using this new client object are non-blocking, and will immediately * return a Java Future object that the caller can later check to see if the service * call has actually completed. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials * to authenticate requests with AWS services. */ public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, Executors.newCachedThreadPool()); } /** * Constructs a new asynchronous client to invoke service methods on * AmazonCloudFront using the specified AWS account credentials provider * and executor service. Default client settings will be used. * *

* All calls made using this new client object are non-blocking, and will immediately * return a Java Future object that the caller can later check to see if the service * call has actually completed. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials * to authenticate requests with AWS services. * @param executorService * The executor service by which all asynchronous requests will * be executed. */ public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, new ClientConfiguration(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on * AmazonCloudFront using the specified AWS account credentials * provider, executor service, and client configuration options. * *

* All calls made using this new client object are non-blocking, and will immediately * return a Java Future object that the caller can later check to see if the service * call has actually completed. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials * to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy * settings, etc). * @param executorService * The executor service by which all asynchronous requests will * be executed. */ public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } /** * Returns the executor service used by this async client to execute * requests. * * @return The executor service used by this async client to execute * requests. */ public ExecutorService getExecutorService() { return executorService; } /** * 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 getExecutorService().shutdown() prior to calling this method. */ @Override public void shutdown() { super.shutdown(); executorService.shutdownNow(); } /** *

* Delete an origin access identity. *

* * @param deleteCloudFrontOriginAccessIdentityRequest Container for the * necessary parameters to execute the * DeleteCloudFrontOriginAccessIdentity operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * DeleteCloudFrontOriginAccessIdentity service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future deleteCloudFrontOriginAccessIdentityAsync(final DeleteCloudFrontOriginAccessIdentityRequest deleteCloudFrontOriginAccessIdentityRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public Void call() throws Exception { deleteCloudFrontOriginAccessIdentity(deleteCloudFrontOriginAccessIdentityRequest); return null; } }); } /** *

* Get the configuration information about a streaming distribution. *

* * @param getStreamingDistributionConfigRequest Container for the * necessary parameters to execute the GetStreamingDistributionConfig * operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * GetStreamingDistributionConfig service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getStreamingDistributionConfigAsync(final GetStreamingDistributionConfigRequest getStreamingDistributionConfigRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetStreamingDistributionConfigResult call() throws Exception { return getStreamingDistributionConfig(getStreamingDistributionConfigRequest); } }); } /** *

* Get the information about an invalidation. *

* * @param getInvalidationRequest Container for the necessary parameters * to execute the GetInvalidation operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * GetInvalidation service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getInvalidationAsync(final GetInvalidationRequest getInvalidationRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetInvalidationResult call() throws Exception { return getInvalidation(getInvalidationRequest); } }); } /** *

* Delete a streaming distribution. *

* * @param deleteStreamingDistributionRequest Container for the necessary * parameters to execute the DeleteStreamingDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * DeleteStreamingDistribution service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future deleteStreamingDistributionAsync(final DeleteStreamingDistributionRequest deleteStreamingDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public Void call() throws Exception { deleteStreamingDistribution(deleteStreamingDistributionRequest); return null; } }); } /** *

* Create a new streaming distribution. *

* * @param createStreamingDistributionRequest Container for the necessary * parameters to execute the CreateStreamingDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * CreateStreamingDistribution service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future createStreamingDistributionAsync(final CreateStreamingDistributionRequest createStreamingDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public CreateStreamingDistributionResult call() throws Exception { return createStreamingDistribution(createStreamingDistributionRequest); } }); } /** *

* Create a new distribution. *

* * @param createDistributionRequest Container for the necessary * parameters to execute the CreateDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * CreateDistribution service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future createDistributionAsync(final CreateDistributionRequest createDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public CreateDistributionResult call() throws Exception { return createDistribution(createDistributionRequest); } }); } /** *

* Delete a distribution. *

* * @param deleteDistributionRequest Container for the necessary * parameters to execute the DeleteDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * DeleteDistribution service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future deleteDistributionAsync(final DeleteDistributionRequest deleteDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public Void call() throws Exception { deleteDistribution(deleteDistributionRequest); return null; } }); } /** *

* Update a distribution. *

* * @param updateDistributionRequest Container for the necessary * parameters to execute the UpdateDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * UpdateDistribution service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future updateDistributionAsync(final UpdateDistributionRequest updateDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public UpdateDistributionResult call() throws Exception { return updateDistribution(updateDistributionRequest); } }); } /** *

* Update a streaming distribution. *

* * @param updateStreamingDistributionRequest Container for the necessary * parameters to execute the UpdateStreamingDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * UpdateStreamingDistribution service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future updateStreamingDistributionAsync(final UpdateStreamingDistributionRequest updateStreamingDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public UpdateStreamingDistributionResult call() throws Exception { return updateStreamingDistribution(updateStreamingDistributionRequest); } }); } /** *

* Create a new origin access identity. *

* * @param createCloudFrontOriginAccessIdentityRequest Container for the * necessary parameters to execute the * CreateCloudFrontOriginAccessIdentity operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * CreateCloudFrontOriginAccessIdentity service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future createCloudFrontOriginAccessIdentityAsync(final CreateCloudFrontOriginAccessIdentityRequest createCloudFrontOriginAccessIdentityRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public CreateCloudFrontOriginAccessIdentityResult call() throws Exception { return createCloudFrontOriginAccessIdentity(createCloudFrontOriginAccessIdentityRequest); } }); } /** *

* Get the information about a distribution. *

* * @param getDistributionRequest Container for the necessary parameters * to execute the GetDistribution operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * GetDistribution service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getDistributionAsync(final GetDistributionRequest getDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetDistributionResult call() throws Exception { return getDistribution(getDistributionRequest); } }); } /** *

* Get the configuration information about an origin access identity. *

* * @param getCloudFrontOriginAccessIdentityConfigRequest Container for * the necessary parameters to execute the * GetCloudFrontOriginAccessIdentityConfig operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * GetCloudFrontOriginAccessIdentityConfig service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getCloudFrontOriginAccessIdentityConfigAsync(final GetCloudFrontOriginAccessIdentityConfigRequest getCloudFrontOriginAccessIdentityConfigRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetCloudFrontOriginAccessIdentityConfigResult call() throws Exception { return getCloudFrontOriginAccessIdentityConfig(getCloudFrontOriginAccessIdentityConfigRequest); } }); } /** *

* Get the information about a streaming distribution. *

* * @param getStreamingDistributionRequest Container for the necessary * parameters to execute the GetStreamingDistribution operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * GetStreamingDistribution service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getStreamingDistributionAsync(final GetStreamingDistributionRequest getStreamingDistributionRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetStreamingDistributionResult call() throws Exception { return getStreamingDistribution(getStreamingDistributionRequest); } }); } /** *

* List distributions. *

* * @param listDistributionsRequest Container for the necessary parameters * to execute the ListDistributions operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * ListDistributions service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future listDistributionsAsync(final ListDistributionsRequest listDistributionsRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public ListDistributionsResult call() throws Exception { return listDistributions(listDistributionsRequest); } }); } /** *

* Update an origin access identity. *

* * @param updateCloudFrontOriginAccessIdentityRequest Container for the * necessary parameters to execute the * UpdateCloudFrontOriginAccessIdentity operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * UpdateCloudFrontOriginAccessIdentity service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future updateCloudFrontOriginAccessIdentityAsync(final UpdateCloudFrontOriginAccessIdentityRequest updateCloudFrontOriginAccessIdentityRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public UpdateCloudFrontOriginAccessIdentityResult call() throws Exception { return updateCloudFrontOriginAccessIdentity(updateCloudFrontOriginAccessIdentityRequest); } }); } /** *

* Get the configuration information about a distribution. *

* * @param getDistributionConfigRequest Container for the necessary * parameters to execute the GetDistributionConfig operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * GetDistributionConfig service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getDistributionConfigAsync(final GetDistributionConfigRequest getDistributionConfigRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetDistributionConfigResult call() throws Exception { return getDistributionConfig(getDistributionConfigRequest); } }); } /** *

* Get the information about an origin access identity. *

* * @param getCloudFrontOriginAccessIdentityRequest Container for the * necessary parameters to execute the GetCloudFrontOriginAccessIdentity * operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * GetCloudFrontOriginAccessIdentity service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future getCloudFrontOriginAccessIdentityAsync(final GetCloudFrontOriginAccessIdentityRequest getCloudFrontOriginAccessIdentityRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public GetCloudFrontOriginAccessIdentityResult call() throws Exception { return getCloudFrontOriginAccessIdentity(getCloudFrontOriginAccessIdentityRequest); } }); } /** *

* Create a new invalidation. *

* * @param createInvalidationRequest Container for the necessary * parameters to execute the CreateInvalidation operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * CreateInvalidation service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future createInvalidationAsync(final CreateInvalidationRequest createInvalidationRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public CreateInvalidationResult call() throws Exception { return createInvalidation(createInvalidationRequest); } }); } /** *

* List origin access identities. *

* * @param listCloudFrontOriginAccessIdentitiesRequest Container for the * necessary parameters to execute the * ListCloudFrontOriginAccessIdentities operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * ListCloudFrontOriginAccessIdentities service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future listCloudFrontOriginAccessIdentitiesAsync(final ListCloudFrontOriginAccessIdentitiesRequest listCloudFrontOriginAccessIdentitiesRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public ListCloudFrontOriginAccessIdentitiesResult call() throws Exception { return listCloudFrontOriginAccessIdentities(listCloudFrontOriginAccessIdentitiesRequest); } }); } /** *

* List streaming distributions. *

* * @param listStreamingDistributionsRequest Container for the necessary * parameters to execute the ListStreamingDistributions operation on * AmazonCloudFront. * * @return A Java Future object containing the response from the * ListStreamingDistributions service method, as returned by * AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future listStreamingDistributionsAsync(final ListStreamingDistributionsRequest listStreamingDistributionsRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public ListStreamingDistributionsResult call() throws Exception { return listStreamingDistributions(listStreamingDistributionsRequest); } }); } /** *

* List invalidation batches. *

* * @param listInvalidationsRequest Container for the necessary parameters * to execute the ListInvalidations operation on AmazonCloudFront. * * @return A Java Future object containing the response from the * ListInvalidations service method, as returned by AmazonCloudFront. * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonCloudFront indicating * either a problem with the data in the request, or a server side issue. */ public Future listInvalidationsAsync(final ListInvalidationsRequest listInvalidationsRequest) throws AmazonServiceException, AmazonClientException { return executorService.submit(new Callable() { public ListInvalidationsResult call() throws Exception { return listInvalidations(listInvalidationsRequest); } }); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy