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

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

/*
 * 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.cloudfront;

import static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.cloudfront.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

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

* Amazon CloudFront *

* This is the Amazon CloudFront API Reference. This guide is for developers who need detailed information about * CloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the Amazon * CloudFront Developer Guide. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonCloudFrontAsyncClient extends AmazonCloudFrontClient implements AmazonCloudFrontAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; /** * Constructs a new asynchronous client to invoke service methods on CloudFront. A credentials provider chain will * be used that searches for credentials in this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonCloudFrontAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront. A credentials provider chain will * be used that searches for credentials in this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param clientConfiguration * The client configuration options controlling how this client connects to CloudFront (ex: proxy settings, * retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonCloudFrontAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified AWS account * credentials. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified AWS account * credentials and executor service. Default client settings will be used. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCloudFrontAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified AWS account * credentials, executor service, and client configuration options. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCloudFrontAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonCloudFrontAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified AWS account * credentials provider. Default client settings will be used. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the provided AWS account * credentials provider and client configuration options. *

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCloudFrontAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified AWS account * credentials provider and executor service. Default client settings will be used. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCloudFrontAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified AWS account * credentials provider, executor service, and client configuration options. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonCloudFrontAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCloudFrontAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonCloudFrontAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonCloudFrontAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonCloudFrontAsyncClientBuilder asyncBuilder() { return AmazonCloudFrontAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonCloudFrontAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on CloudFront using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonCloudFrontAsyncClient(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 createCachePolicyAsync(CreateCachePolicyRequest request) { return createCachePolicyAsync(request, null); } @Override public java.util.concurrent.Future createCachePolicyAsync(final CreateCachePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCachePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCachePolicyResult call() throws Exception { CreateCachePolicyResult result = null; try { result = executeCreateCachePolicy(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 createCloudFrontOriginAccessIdentityAsync( CreateCloudFrontOriginAccessIdentityRequest request) { return createCloudFrontOriginAccessIdentityAsync(request, null); } @Override public java.util.concurrent.Future createCloudFrontOriginAccessIdentityAsync( final CreateCloudFrontOriginAccessIdentityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCloudFrontOriginAccessIdentityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCloudFrontOriginAccessIdentityResult call() throws Exception { CreateCloudFrontOriginAccessIdentityResult result = null; try { result = executeCreateCloudFrontOriginAccessIdentity(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 createDistributionAsync(CreateDistributionRequest request) { return createDistributionAsync(request, null); } @Override public java.util.concurrent.Future createDistributionAsync(final CreateDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDistributionResult call() throws Exception { CreateDistributionResult result = null; try { result = executeCreateDistribution(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 createDistributionWithTagsAsync(CreateDistributionWithTagsRequest request) { return createDistributionWithTagsAsync(request, null); } @Override public java.util.concurrent.Future createDistributionWithTagsAsync(final CreateDistributionWithTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDistributionWithTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDistributionWithTagsResult call() throws Exception { CreateDistributionWithTagsResult result = null; try { result = executeCreateDistributionWithTags(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 createFieldLevelEncryptionConfigAsync( CreateFieldLevelEncryptionConfigRequest request) { return createFieldLevelEncryptionConfigAsync(request, null); } @Override public java.util.concurrent.Future createFieldLevelEncryptionConfigAsync( final CreateFieldLevelEncryptionConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFieldLevelEncryptionConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFieldLevelEncryptionConfigResult call() throws Exception { CreateFieldLevelEncryptionConfigResult result = null; try { result = executeCreateFieldLevelEncryptionConfig(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 createFieldLevelEncryptionProfileAsync( CreateFieldLevelEncryptionProfileRequest request) { return createFieldLevelEncryptionProfileAsync(request, null); } @Override public java.util.concurrent.Future createFieldLevelEncryptionProfileAsync( final CreateFieldLevelEncryptionProfileRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFieldLevelEncryptionProfileRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFieldLevelEncryptionProfileResult call() throws Exception { CreateFieldLevelEncryptionProfileResult result = null; try { result = executeCreateFieldLevelEncryptionProfile(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 createFunctionAsync(CreateFunctionRequest request) { return createFunctionAsync(request, null); } @Override public java.util.concurrent.Future createFunctionAsync(final CreateFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFunctionResult call() throws Exception { CreateFunctionResult result = null; try { result = executeCreateFunction(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 createInvalidationAsync(CreateInvalidationRequest request) { return createInvalidationAsync(request, null); } @Override public java.util.concurrent.Future createInvalidationAsync(final CreateInvalidationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateInvalidationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateInvalidationResult call() throws Exception { CreateInvalidationResult result = null; try { result = executeCreateInvalidation(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 createKeyGroupAsync(CreateKeyGroupRequest request) { return createKeyGroupAsync(request, null); } @Override public java.util.concurrent.Future createKeyGroupAsync(final CreateKeyGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateKeyGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateKeyGroupResult call() throws Exception { CreateKeyGroupResult result = null; try { result = executeCreateKeyGroup(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 createMonitoringSubscriptionAsync(CreateMonitoringSubscriptionRequest request) { return createMonitoringSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future createMonitoringSubscriptionAsync(final CreateMonitoringSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateMonitoringSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateMonitoringSubscriptionResult call() throws Exception { CreateMonitoringSubscriptionResult result = null; try { result = executeCreateMonitoringSubscription(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 createOriginRequestPolicyAsync(CreateOriginRequestPolicyRequest request) { return createOriginRequestPolicyAsync(request, null); } @Override public java.util.concurrent.Future createOriginRequestPolicyAsync(final CreateOriginRequestPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateOriginRequestPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateOriginRequestPolicyResult call() throws Exception { CreateOriginRequestPolicyResult result = null; try { result = executeCreateOriginRequestPolicy(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 createPublicKeyAsync(CreatePublicKeyRequest request) { return createPublicKeyAsync(request, null); } @Override public java.util.concurrent.Future createPublicKeyAsync(final CreatePublicKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreatePublicKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreatePublicKeyResult call() throws Exception { CreatePublicKeyResult result = null; try { result = executeCreatePublicKey(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 createRealtimeLogConfigAsync(CreateRealtimeLogConfigRequest request) { return createRealtimeLogConfigAsync(request, null); } @Override public java.util.concurrent.Future createRealtimeLogConfigAsync(final CreateRealtimeLogConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRealtimeLogConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRealtimeLogConfigResult call() throws Exception { CreateRealtimeLogConfigResult result = null; try { result = executeCreateRealtimeLogConfig(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 createStreamingDistributionAsync(CreateStreamingDistributionRequest request) { return createStreamingDistributionAsync(request, null); } @Override public java.util.concurrent.Future createStreamingDistributionAsync(final CreateStreamingDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStreamingDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStreamingDistributionResult call() throws Exception { CreateStreamingDistributionResult result = null; try { result = executeCreateStreamingDistribution(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 createStreamingDistributionWithTagsAsync( CreateStreamingDistributionWithTagsRequest request) { return createStreamingDistributionWithTagsAsync(request, null); } @Override public java.util.concurrent.Future createStreamingDistributionWithTagsAsync( final CreateStreamingDistributionWithTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStreamingDistributionWithTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStreamingDistributionWithTagsResult call() throws Exception { CreateStreamingDistributionWithTagsResult result = null; try { result = executeCreateStreamingDistributionWithTags(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 deleteCachePolicyAsync(DeleteCachePolicyRequest request) { return deleteCachePolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteCachePolicyAsync(final DeleteCachePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCachePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCachePolicyResult call() throws Exception { DeleteCachePolicyResult result = null; try { result = executeDeleteCachePolicy(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 deleteCloudFrontOriginAccessIdentityAsync( DeleteCloudFrontOriginAccessIdentityRequest request) { return deleteCloudFrontOriginAccessIdentityAsync(request, null); } @Override public java.util.concurrent.Future deleteCloudFrontOriginAccessIdentityAsync( final DeleteCloudFrontOriginAccessIdentityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCloudFrontOriginAccessIdentityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCloudFrontOriginAccessIdentityResult call() throws Exception { DeleteCloudFrontOriginAccessIdentityResult result = null; try { result = executeDeleteCloudFrontOriginAccessIdentity(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 deleteDistributionAsync(DeleteDistributionRequest request) { return deleteDistributionAsync(request, null); } @Override public java.util.concurrent.Future deleteDistributionAsync(final DeleteDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDistributionResult call() throws Exception { DeleteDistributionResult result = null; try { result = executeDeleteDistribution(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 deleteFieldLevelEncryptionConfigAsync( DeleteFieldLevelEncryptionConfigRequest request) { return deleteFieldLevelEncryptionConfigAsync(request, null); } @Override public java.util.concurrent.Future deleteFieldLevelEncryptionConfigAsync( final DeleteFieldLevelEncryptionConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFieldLevelEncryptionConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFieldLevelEncryptionConfigResult call() throws Exception { DeleteFieldLevelEncryptionConfigResult result = null; try { result = executeDeleteFieldLevelEncryptionConfig(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 deleteFieldLevelEncryptionProfileAsync( DeleteFieldLevelEncryptionProfileRequest request) { return deleteFieldLevelEncryptionProfileAsync(request, null); } @Override public java.util.concurrent.Future deleteFieldLevelEncryptionProfileAsync( final DeleteFieldLevelEncryptionProfileRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFieldLevelEncryptionProfileRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFieldLevelEncryptionProfileResult call() throws Exception { DeleteFieldLevelEncryptionProfileResult result = null; try { result = executeDeleteFieldLevelEncryptionProfile(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 deleteFunctionAsync(DeleteFunctionRequest request) { return deleteFunctionAsync(request, null); } @Override public java.util.concurrent.Future deleteFunctionAsync(final DeleteFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFunctionResult call() throws Exception { DeleteFunctionResult result = null; try { result = executeDeleteFunction(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 deleteKeyGroupAsync(DeleteKeyGroupRequest request) { return deleteKeyGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteKeyGroupAsync(final DeleteKeyGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteKeyGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteKeyGroupResult call() throws Exception { DeleteKeyGroupResult result = null; try { result = executeDeleteKeyGroup(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 deleteMonitoringSubscriptionAsync(DeleteMonitoringSubscriptionRequest request) { return deleteMonitoringSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future deleteMonitoringSubscriptionAsync(final DeleteMonitoringSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMonitoringSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMonitoringSubscriptionResult call() throws Exception { DeleteMonitoringSubscriptionResult result = null; try { result = executeDeleteMonitoringSubscription(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 deleteOriginRequestPolicyAsync(DeleteOriginRequestPolicyRequest request) { return deleteOriginRequestPolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteOriginRequestPolicyAsync(final DeleteOriginRequestPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteOriginRequestPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteOriginRequestPolicyResult call() throws Exception { DeleteOriginRequestPolicyResult result = null; try { result = executeDeleteOriginRequestPolicy(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 deletePublicKeyAsync(DeletePublicKeyRequest request) { return deletePublicKeyAsync(request, null); } @Override public java.util.concurrent.Future deletePublicKeyAsync(final DeletePublicKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePublicKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePublicKeyResult call() throws Exception { DeletePublicKeyResult result = null; try { result = executeDeletePublicKey(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 deleteRealtimeLogConfigAsync(DeleteRealtimeLogConfigRequest request) { return deleteRealtimeLogConfigAsync(request, null); } @Override public java.util.concurrent.Future deleteRealtimeLogConfigAsync(final DeleteRealtimeLogConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRealtimeLogConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRealtimeLogConfigResult call() throws Exception { DeleteRealtimeLogConfigResult result = null; try { result = executeDeleteRealtimeLogConfig(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 deleteStreamingDistributionAsync(DeleteStreamingDistributionRequest request) { return deleteStreamingDistributionAsync(request, null); } @Override public java.util.concurrent.Future deleteStreamingDistributionAsync(final DeleteStreamingDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteStreamingDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteStreamingDistributionResult call() throws Exception { DeleteStreamingDistributionResult result = null; try { result = executeDeleteStreamingDistribution(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 describeFunctionAsync(DescribeFunctionRequest request) { return describeFunctionAsync(request, null); } @Override public java.util.concurrent.Future describeFunctionAsync(final DescribeFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFunctionResult call() throws Exception { DescribeFunctionResult result = null; try { result = executeDescribeFunction(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 getCachePolicyAsync(GetCachePolicyRequest request) { return getCachePolicyAsync(request, null); } @Override public java.util.concurrent.Future getCachePolicyAsync(final GetCachePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCachePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCachePolicyResult call() throws Exception { GetCachePolicyResult result = null; try { result = executeGetCachePolicy(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 getCachePolicyConfigAsync(GetCachePolicyConfigRequest request) { return getCachePolicyConfigAsync(request, null); } @Override public java.util.concurrent.Future getCachePolicyConfigAsync(final GetCachePolicyConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCachePolicyConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCachePolicyConfigResult call() throws Exception { GetCachePolicyConfigResult result = null; try { result = executeGetCachePolicyConfig(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 getCloudFrontOriginAccessIdentityAsync( GetCloudFrontOriginAccessIdentityRequest request) { return getCloudFrontOriginAccessIdentityAsync(request, null); } @Override public java.util.concurrent.Future getCloudFrontOriginAccessIdentityAsync( final GetCloudFrontOriginAccessIdentityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCloudFrontOriginAccessIdentityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCloudFrontOriginAccessIdentityResult call() throws Exception { GetCloudFrontOriginAccessIdentityResult result = null; try { result = executeGetCloudFrontOriginAccessIdentity(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 getCloudFrontOriginAccessIdentityConfigAsync( GetCloudFrontOriginAccessIdentityConfigRequest request) { return getCloudFrontOriginAccessIdentityConfigAsync(request, null); } @Override public java.util.concurrent.Future getCloudFrontOriginAccessIdentityConfigAsync( final GetCloudFrontOriginAccessIdentityConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCloudFrontOriginAccessIdentityConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCloudFrontOriginAccessIdentityConfigResult call() throws Exception { GetCloudFrontOriginAccessIdentityConfigResult result = null; try { result = executeGetCloudFrontOriginAccessIdentityConfig(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 getDistributionAsync(GetDistributionRequest request) { return getDistributionAsync(request, null); } @Override public java.util.concurrent.Future getDistributionAsync(final GetDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDistributionResult call() throws Exception { GetDistributionResult result = null; try { result = executeGetDistribution(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 getDistributionConfigAsync(GetDistributionConfigRequest request) { return getDistributionConfigAsync(request, null); } @Override public java.util.concurrent.Future getDistributionConfigAsync(final GetDistributionConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDistributionConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDistributionConfigResult call() throws Exception { GetDistributionConfigResult result = null; try { result = executeGetDistributionConfig(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 getFieldLevelEncryptionAsync(GetFieldLevelEncryptionRequest request) { return getFieldLevelEncryptionAsync(request, null); } @Override public java.util.concurrent.Future getFieldLevelEncryptionAsync(final GetFieldLevelEncryptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFieldLevelEncryptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFieldLevelEncryptionResult call() throws Exception { GetFieldLevelEncryptionResult result = null; try { result = executeGetFieldLevelEncryption(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 getFieldLevelEncryptionConfigAsync(GetFieldLevelEncryptionConfigRequest request) { return getFieldLevelEncryptionConfigAsync(request, null); } @Override public java.util.concurrent.Future getFieldLevelEncryptionConfigAsync( final GetFieldLevelEncryptionConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFieldLevelEncryptionConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFieldLevelEncryptionConfigResult call() throws Exception { GetFieldLevelEncryptionConfigResult result = null; try { result = executeGetFieldLevelEncryptionConfig(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 getFieldLevelEncryptionProfileAsync(GetFieldLevelEncryptionProfileRequest request) { return getFieldLevelEncryptionProfileAsync(request, null); } @Override public java.util.concurrent.Future getFieldLevelEncryptionProfileAsync( final GetFieldLevelEncryptionProfileRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFieldLevelEncryptionProfileRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFieldLevelEncryptionProfileResult call() throws Exception { GetFieldLevelEncryptionProfileResult result = null; try { result = executeGetFieldLevelEncryptionProfile(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 getFieldLevelEncryptionProfileConfigAsync( GetFieldLevelEncryptionProfileConfigRequest request) { return getFieldLevelEncryptionProfileConfigAsync(request, null); } @Override public java.util.concurrent.Future getFieldLevelEncryptionProfileConfigAsync( final GetFieldLevelEncryptionProfileConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFieldLevelEncryptionProfileConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFieldLevelEncryptionProfileConfigResult call() throws Exception { GetFieldLevelEncryptionProfileConfigResult result = null; try { result = executeGetFieldLevelEncryptionProfileConfig(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 getFunctionAsync(GetFunctionRequest request) { return getFunctionAsync(request, null); } @Override public java.util.concurrent.Future getFunctionAsync(final GetFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFunctionResult call() throws Exception { GetFunctionResult result = null; try { result = executeGetFunction(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 getInvalidationAsync(GetInvalidationRequest request) { return getInvalidationAsync(request, null); } @Override public java.util.concurrent.Future getInvalidationAsync(final GetInvalidationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetInvalidationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetInvalidationResult call() throws Exception { GetInvalidationResult result = null; try { result = executeGetInvalidation(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 getKeyGroupAsync(GetKeyGroupRequest request) { return getKeyGroupAsync(request, null); } @Override public java.util.concurrent.Future getKeyGroupAsync(final GetKeyGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetKeyGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetKeyGroupResult call() throws Exception { GetKeyGroupResult result = null; try { result = executeGetKeyGroup(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 getKeyGroupConfigAsync(GetKeyGroupConfigRequest request) { return getKeyGroupConfigAsync(request, null); } @Override public java.util.concurrent.Future getKeyGroupConfigAsync(final GetKeyGroupConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetKeyGroupConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetKeyGroupConfigResult call() throws Exception { GetKeyGroupConfigResult result = null; try { result = executeGetKeyGroupConfig(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 getMonitoringSubscriptionAsync(GetMonitoringSubscriptionRequest request) { return getMonitoringSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future getMonitoringSubscriptionAsync(final GetMonitoringSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetMonitoringSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetMonitoringSubscriptionResult call() throws Exception { GetMonitoringSubscriptionResult result = null; try { result = executeGetMonitoringSubscription(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 getOriginRequestPolicyAsync(GetOriginRequestPolicyRequest request) { return getOriginRequestPolicyAsync(request, null); } @Override public java.util.concurrent.Future getOriginRequestPolicyAsync(final GetOriginRequestPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetOriginRequestPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetOriginRequestPolicyResult call() throws Exception { GetOriginRequestPolicyResult result = null; try { result = executeGetOriginRequestPolicy(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 getOriginRequestPolicyConfigAsync(GetOriginRequestPolicyConfigRequest request) { return getOriginRequestPolicyConfigAsync(request, null); } @Override public java.util.concurrent.Future getOriginRequestPolicyConfigAsync(final GetOriginRequestPolicyConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetOriginRequestPolicyConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetOriginRequestPolicyConfigResult call() throws Exception { GetOriginRequestPolicyConfigResult result = null; try { result = executeGetOriginRequestPolicyConfig(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 getPublicKeyAsync(GetPublicKeyRequest request) { return getPublicKeyAsync(request, null); } @Override public java.util.concurrent.Future getPublicKeyAsync(final GetPublicKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPublicKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPublicKeyResult call() throws Exception { GetPublicKeyResult result = null; try { result = executeGetPublicKey(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 getPublicKeyConfigAsync(GetPublicKeyConfigRequest request) { return getPublicKeyConfigAsync(request, null); } @Override public java.util.concurrent.Future getPublicKeyConfigAsync(final GetPublicKeyConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPublicKeyConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPublicKeyConfigResult call() throws Exception { GetPublicKeyConfigResult result = null; try { result = executeGetPublicKeyConfig(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 getRealtimeLogConfigAsync(GetRealtimeLogConfigRequest request) { return getRealtimeLogConfigAsync(request, null); } @Override public java.util.concurrent.Future getRealtimeLogConfigAsync(final GetRealtimeLogConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRealtimeLogConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRealtimeLogConfigResult call() throws Exception { GetRealtimeLogConfigResult result = null; try { result = executeGetRealtimeLogConfig(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 getStreamingDistributionAsync(GetStreamingDistributionRequest request) { return getStreamingDistributionAsync(request, null); } @Override public java.util.concurrent.Future getStreamingDistributionAsync(final GetStreamingDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetStreamingDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetStreamingDistributionResult call() throws Exception { GetStreamingDistributionResult result = null; try { result = executeGetStreamingDistribution(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 getStreamingDistributionConfigAsync(GetStreamingDistributionConfigRequest request) { return getStreamingDistributionConfigAsync(request, null); } @Override public java.util.concurrent.Future getStreamingDistributionConfigAsync( final GetStreamingDistributionConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetStreamingDistributionConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetStreamingDistributionConfigResult call() throws Exception { GetStreamingDistributionConfigResult result = null; try { result = executeGetStreamingDistributionConfig(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 listCachePoliciesAsync(ListCachePoliciesRequest request) { return listCachePoliciesAsync(request, null); } @Override public java.util.concurrent.Future listCachePoliciesAsync(final ListCachePoliciesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCachePoliciesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCachePoliciesResult call() throws Exception { ListCachePoliciesResult result = null; try { result = executeListCachePolicies(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 listCloudFrontOriginAccessIdentitiesAsync( ListCloudFrontOriginAccessIdentitiesRequest request) { return listCloudFrontOriginAccessIdentitiesAsync(request, null); } @Override public java.util.concurrent.Future listCloudFrontOriginAccessIdentitiesAsync( final ListCloudFrontOriginAccessIdentitiesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCloudFrontOriginAccessIdentitiesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCloudFrontOriginAccessIdentitiesResult call() throws Exception { ListCloudFrontOriginAccessIdentitiesResult result = null; try { result = executeListCloudFrontOriginAccessIdentities(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 listDistributionsAsync(ListDistributionsRequest request) { return listDistributionsAsync(request, null); } @Override public java.util.concurrent.Future listDistributionsAsync(final ListDistributionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDistributionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDistributionsResult call() throws Exception { ListDistributionsResult result = null; try { result = executeListDistributions(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 listDistributionsByCachePolicyIdAsync( ListDistributionsByCachePolicyIdRequest request) { return listDistributionsByCachePolicyIdAsync(request, null); } @Override public java.util.concurrent.Future listDistributionsByCachePolicyIdAsync( final ListDistributionsByCachePolicyIdRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDistributionsByCachePolicyIdRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDistributionsByCachePolicyIdResult call() throws Exception { ListDistributionsByCachePolicyIdResult result = null; try { result = executeListDistributionsByCachePolicyId(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 listDistributionsByKeyGroupAsync(ListDistributionsByKeyGroupRequest request) { return listDistributionsByKeyGroupAsync(request, null); } @Override public java.util.concurrent.Future listDistributionsByKeyGroupAsync(final ListDistributionsByKeyGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDistributionsByKeyGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDistributionsByKeyGroupResult call() throws Exception { ListDistributionsByKeyGroupResult result = null; try { result = executeListDistributionsByKeyGroup(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 listDistributionsByOriginRequestPolicyIdAsync( ListDistributionsByOriginRequestPolicyIdRequest request) { return listDistributionsByOriginRequestPolicyIdAsync(request, null); } @Override public java.util.concurrent.Future listDistributionsByOriginRequestPolicyIdAsync( final ListDistributionsByOriginRequestPolicyIdRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDistributionsByOriginRequestPolicyIdRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDistributionsByOriginRequestPolicyIdResult call() throws Exception { ListDistributionsByOriginRequestPolicyIdResult result = null; try { result = executeListDistributionsByOriginRequestPolicyId(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 listDistributionsByRealtimeLogConfigAsync( ListDistributionsByRealtimeLogConfigRequest request) { return listDistributionsByRealtimeLogConfigAsync(request, null); } @Override public java.util.concurrent.Future listDistributionsByRealtimeLogConfigAsync( final ListDistributionsByRealtimeLogConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDistributionsByRealtimeLogConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDistributionsByRealtimeLogConfigResult call() throws Exception { ListDistributionsByRealtimeLogConfigResult result = null; try { result = executeListDistributionsByRealtimeLogConfig(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 listDistributionsByWebACLIdAsync(ListDistributionsByWebACLIdRequest request) { return listDistributionsByWebACLIdAsync(request, null); } @Override public java.util.concurrent.Future listDistributionsByWebACLIdAsync(final ListDistributionsByWebACLIdRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDistributionsByWebACLIdRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDistributionsByWebACLIdResult call() throws Exception { ListDistributionsByWebACLIdResult result = null; try { result = executeListDistributionsByWebACLId(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 listFieldLevelEncryptionConfigsAsync( ListFieldLevelEncryptionConfigsRequest request) { return listFieldLevelEncryptionConfigsAsync(request, null); } @Override public java.util.concurrent.Future listFieldLevelEncryptionConfigsAsync( final ListFieldLevelEncryptionConfigsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFieldLevelEncryptionConfigsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFieldLevelEncryptionConfigsResult call() throws Exception { ListFieldLevelEncryptionConfigsResult result = null; try { result = executeListFieldLevelEncryptionConfigs(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 listFieldLevelEncryptionProfilesAsync( ListFieldLevelEncryptionProfilesRequest request) { return listFieldLevelEncryptionProfilesAsync(request, null); } @Override public java.util.concurrent.Future listFieldLevelEncryptionProfilesAsync( final ListFieldLevelEncryptionProfilesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFieldLevelEncryptionProfilesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFieldLevelEncryptionProfilesResult call() throws Exception { ListFieldLevelEncryptionProfilesResult result = null; try { result = executeListFieldLevelEncryptionProfiles(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 listFunctionsAsync(ListFunctionsRequest request) { return listFunctionsAsync(request, null); } @Override public java.util.concurrent.Future listFunctionsAsync(final ListFunctionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFunctionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFunctionsResult call() throws Exception { ListFunctionsResult result = null; try { result = executeListFunctions(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 listInvalidationsAsync(ListInvalidationsRequest request) { return listInvalidationsAsync(request, null); } @Override public java.util.concurrent.Future listInvalidationsAsync(final ListInvalidationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInvalidationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInvalidationsResult call() throws Exception { ListInvalidationsResult result = null; try { result = executeListInvalidations(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 listKeyGroupsAsync(ListKeyGroupsRequest request) { return listKeyGroupsAsync(request, null); } @Override public java.util.concurrent.Future listKeyGroupsAsync(final ListKeyGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListKeyGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListKeyGroupsResult call() throws Exception { ListKeyGroupsResult result = null; try { result = executeListKeyGroups(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 listOriginRequestPoliciesAsync(ListOriginRequestPoliciesRequest request) { return listOriginRequestPoliciesAsync(request, null); } @Override public java.util.concurrent.Future listOriginRequestPoliciesAsync(final ListOriginRequestPoliciesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListOriginRequestPoliciesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListOriginRequestPoliciesResult call() throws Exception { ListOriginRequestPoliciesResult result = null; try { result = executeListOriginRequestPolicies(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 listPublicKeysAsync(ListPublicKeysRequest request) { return listPublicKeysAsync(request, null); } @Override public java.util.concurrent.Future listPublicKeysAsync(final ListPublicKeysRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPublicKeysRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPublicKeysResult call() throws Exception { ListPublicKeysResult result = null; try { result = executeListPublicKeys(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 listRealtimeLogConfigsAsync(ListRealtimeLogConfigsRequest request) { return listRealtimeLogConfigsAsync(request, null); } @Override public java.util.concurrent.Future listRealtimeLogConfigsAsync(final ListRealtimeLogConfigsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRealtimeLogConfigsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRealtimeLogConfigsResult call() throws Exception { ListRealtimeLogConfigsResult result = null; try { result = executeListRealtimeLogConfigs(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 listStreamingDistributionsAsync(ListStreamingDistributionsRequest request) { return listStreamingDistributionsAsync(request, null); } @Override public java.util.concurrent.Future listStreamingDistributionsAsync(final ListStreamingDistributionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListStreamingDistributionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListStreamingDistributionsResult call() throws Exception { ListStreamingDistributionsResult result = null; try { result = executeListStreamingDistributions(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 publishFunctionAsync(PublishFunctionRequest request) { return publishFunctionAsync(request, null); } @Override public java.util.concurrent.Future publishFunctionAsync(final PublishFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PublishFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PublishFunctionResult call() throws Exception { PublishFunctionResult result = null; try { result = executePublishFunction(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 testFunctionAsync(TestFunctionRequest request) { return testFunctionAsync(request, null); } @Override public java.util.concurrent.Future testFunctionAsync(final TestFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TestFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TestFunctionResult call() throws Exception { TestFunctionResult result = null; try { result = executeTestFunction(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 updateCachePolicyAsync(UpdateCachePolicyRequest request) { return updateCachePolicyAsync(request, null); } @Override public java.util.concurrent.Future updateCachePolicyAsync(final UpdateCachePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCachePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCachePolicyResult call() throws Exception { UpdateCachePolicyResult result = null; try { result = executeUpdateCachePolicy(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 updateCloudFrontOriginAccessIdentityAsync( UpdateCloudFrontOriginAccessIdentityRequest request) { return updateCloudFrontOriginAccessIdentityAsync(request, null); } @Override public java.util.concurrent.Future updateCloudFrontOriginAccessIdentityAsync( final UpdateCloudFrontOriginAccessIdentityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCloudFrontOriginAccessIdentityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCloudFrontOriginAccessIdentityResult call() throws Exception { UpdateCloudFrontOriginAccessIdentityResult result = null; try { result = executeUpdateCloudFrontOriginAccessIdentity(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 updateDistributionAsync(UpdateDistributionRequest request) { return updateDistributionAsync(request, null); } @Override public java.util.concurrent.Future updateDistributionAsync(final UpdateDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDistributionResult call() throws Exception { UpdateDistributionResult result = null; try { result = executeUpdateDistribution(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 updateFieldLevelEncryptionConfigAsync( UpdateFieldLevelEncryptionConfigRequest request) { return updateFieldLevelEncryptionConfigAsync(request, null); } @Override public java.util.concurrent.Future updateFieldLevelEncryptionConfigAsync( final UpdateFieldLevelEncryptionConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFieldLevelEncryptionConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFieldLevelEncryptionConfigResult call() throws Exception { UpdateFieldLevelEncryptionConfigResult result = null; try { result = executeUpdateFieldLevelEncryptionConfig(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 updateFieldLevelEncryptionProfileAsync( UpdateFieldLevelEncryptionProfileRequest request) { return updateFieldLevelEncryptionProfileAsync(request, null); } @Override public java.util.concurrent.Future updateFieldLevelEncryptionProfileAsync( final UpdateFieldLevelEncryptionProfileRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFieldLevelEncryptionProfileRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFieldLevelEncryptionProfileResult call() throws Exception { UpdateFieldLevelEncryptionProfileResult result = null; try { result = executeUpdateFieldLevelEncryptionProfile(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 updateFunctionAsync(UpdateFunctionRequest request) { return updateFunctionAsync(request, null); } @Override public java.util.concurrent.Future updateFunctionAsync(final UpdateFunctionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFunctionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFunctionResult call() throws Exception { UpdateFunctionResult result = null; try { result = executeUpdateFunction(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 updateKeyGroupAsync(UpdateKeyGroupRequest request) { return updateKeyGroupAsync(request, null); } @Override public java.util.concurrent.Future updateKeyGroupAsync(final UpdateKeyGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateKeyGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateKeyGroupResult call() throws Exception { UpdateKeyGroupResult result = null; try { result = executeUpdateKeyGroup(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 updateOriginRequestPolicyAsync(UpdateOriginRequestPolicyRequest request) { return updateOriginRequestPolicyAsync(request, null); } @Override public java.util.concurrent.Future updateOriginRequestPolicyAsync(final UpdateOriginRequestPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateOriginRequestPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateOriginRequestPolicyResult call() throws Exception { UpdateOriginRequestPolicyResult result = null; try { result = executeUpdateOriginRequestPolicy(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 updatePublicKeyAsync(UpdatePublicKeyRequest request) { return updatePublicKeyAsync(request, null); } @Override public java.util.concurrent.Future updatePublicKeyAsync(final UpdatePublicKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdatePublicKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdatePublicKeyResult call() throws Exception { UpdatePublicKeyResult result = null; try { result = executeUpdatePublicKey(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 updateRealtimeLogConfigAsync(UpdateRealtimeLogConfigRequest request) { return updateRealtimeLogConfigAsync(request, null); } @Override public java.util.concurrent.Future updateRealtimeLogConfigAsync(final UpdateRealtimeLogConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRealtimeLogConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRealtimeLogConfigResult call() throws Exception { UpdateRealtimeLogConfigResult result = null; try { result = executeUpdateRealtimeLogConfig(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 updateStreamingDistributionAsync(UpdateStreamingDistributionRequest request) { return updateStreamingDistributionAsync(request, null); } @Override public java.util.concurrent.Future updateStreamingDistributionAsync(final UpdateStreamingDistributionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateStreamingDistributionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateStreamingDistributionResult call() throws Exception { UpdateStreamingDistributionResult result = null; try { result = executeUpdateStreamingDistribution(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