com.amazonaws.services.cloudfront.AmazonCloudFrontAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudfront Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.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 associateAliasAsync(AssociateAliasRequest request) {
return associateAliasAsync(request, null);
}
@Override
public java.util.concurrent.Future associateAliasAsync(final AssociateAliasRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateAliasRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateAliasResult call() throws Exception {
AssociateAliasResult result = null;
try {
result = executeAssociateAlias(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 copyDistributionAsync(CopyDistributionRequest request) {
return copyDistributionAsync(request, null);
}
@Override
public java.util.concurrent.Future copyDistributionAsync(final CopyDistributionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CopyDistributionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CopyDistributionResult call() throws Exception {
CopyDistributionResult result = null;
try {
result = executeCopyDistribution(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 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 createContinuousDeploymentPolicyAsync(
CreateContinuousDeploymentPolicyRequest request) {
return createContinuousDeploymentPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future createContinuousDeploymentPolicyAsync(
final CreateContinuousDeploymentPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateContinuousDeploymentPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateContinuousDeploymentPolicyResult call() throws Exception {
CreateContinuousDeploymentPolicyResult result = null;
try {
result = executeCreateContinuousDeploymentPolicy(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 createKeyValueStoreAsync(CreateKeyValueStoreRequest request) {
return createKeyValueStoreAsync(request, null);
}
@Override
public java.util.concurrent.Future createKeyValueStoreAsync(final CreateKeyValueStoreRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateKeyValueStoreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateKeyValueStoreResult call() throws Exception {
CreateKeyValueStoreResult result = null;
try {
result = executeCreateKeyValueStore(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 createOriginAccessControlAsync(CreateOriginAccessControlRequest request) {
return createOriginAccessControlAsync(request, null);
}
@Override
public java.util.concurrent.Future createOriginAccessControlAsync(final CreateOriginAccessControlRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateOriginAccessControlRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateOriginAccessControlResult call() throws Exception {
CreateOriginAccessControlResult result = null;
try {
result = executeCreateOriginAccessControl(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 createResponseHeadersPolicyAsync(CreateResponseHeadersPolicyRequest request) {
return createResponseHeadersPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future createResponseHeadersPolicyAsync(final CreateResponseHeadersPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateResponseHeadersPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateResponseHeadersPolicyResult call() throws Exception {
CreateResponseHeadersPolicyResult result = null;
try {
result = executeCreateResponseHeadersPolicy(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 deleteContinuousDeploymentPolicyAsync(
DeleteContinuousDeploymentPolicyRequest request) {
return deleteContinuousDeploymentPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteContinuousDeploymentPolicyAsync(
final DeleteContinuousDeploymentPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteContinuousDeploymentPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteContinuousDeploymentPolicyResult call() throws Exception {
DeleteContinuousDeploymentPolicyResult result = null;
try {
result = executeDeleteContinuousDeploymentPolicy(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 deleteKeyValueStoreAsync(DeleteKeyValueStoreRequest request) {
return deleteKeyValueStoreAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteKeyValueStoreAsync(final DeleteKeyValueStoreRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteKeyValueStoreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteKeyValueStoreResult call() throws Exception {
DeleteKeyValueStoreResult result = null;
try {
result = executeDeleteKeyValueStore(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 deleteOriginAccessControlAsync(DeleteOriginAccessControlRequest request) {
return deleteOriginAccessControlAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteOriginAccessControlAsync(final DeleteOriginAccessControlRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteOriginAccessControlRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteOriginAccessControlResult call() throws Exception {
DeleteOriginAccessControlResult result = null;
try {
result = executeDeleteOriginAccessControl(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 deleteResponseHeadersPolicyAsync(DeleteResponseHeadersPolicyRequest request) {
return deleteResponseHeadersPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteResponseHeadersPolicyAsync(final DeleteResponseHeadersPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteResponseHeadersPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteResponseHeadersPolicyResult call() throws Exception {
DeleteResponseHeadersPolicyResult result = null;
try {
result = executeDeleteResponseHeadersPolicy(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 describeKeyValueStoreAsync(DescribeKeyValueStoreRequest request) {
return describeKeyValueStoreAsync(request, null);
}
@Override
public java.util.concurrent.Future describeKeyValueStoreAsync(final DescribeKeyValueStoreRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeKeyValueStoreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeKeyValueStoreResult call() throws Exception {
DescribeKeyValueStoreResult result = null;
try {
result = executeDescribeKeyValueStore(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 getContinuousDeploymentPolicyAsync(GetContinuousDeploymentPolicyRequest request) {
return getContinuousDeploymentPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getContinuousDeploymentPolicyAsync(
final GetContinuousDeploymentPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetContinuousDeploymentPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetContinuousDeploymentPolicyResult call() throws Exception {
GetContinuousDeploymentPolicyResult result = null;
try {
result = executeGetContinuousDeploymentPolicy(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 getContinuousDeploymentPolicyConfigAsync(
GetContinuousDeploymentPolicyConfigRequest request) {
return getContinuousDeploymentPolicyConfigAsync(request, null);
}
@Override
public java.util.concurrent.Future getContinuousDeploymentPolicyConfigAsync(
final GetContinuousDeploymentPolicyConfigRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetContinuousDeploymentPolicyConfigRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetContinuousDeploymentPolicyConfigResult call() throws Exception {
GetContinuousDeploymentPolicyConfigResult result = null;
try {
result = executeGetContinuousDeploymentPolicyConfig(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 getOriginAccessControlAsync(GetOriginAccessControlRequest request) {
return getOriginAccessControlAsync(request, null);
}
@Override
public java.util.concurrent.Future getOriginAccessControlAsync(final GetOriginAccessControlRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOriginAccessControlRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOriginAccessControlResult call() throws Exception {
GetOriginAccessControlResult result = null;
try {
result = executeGetOriginAccessControl(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 getOriginAccessControlConfigAsync(GetOriginAccessControlConfigRequest request) {
return getOriginAccessControlConfigAsync(request, null);
}
@Override
public java.util.concurrent.Future getOriginAccessControlConfigAsync(final GetOriginAccessControlConfigRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOriginAccessControlConfigRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOriginAccessControlConfigResult call() throws Exception {
GetOriginAccessControlConfigResult result = null;
try {
result = executeGetOriginAccessControlConfig(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