com.amazonaws.services.directory.AWSDirectoryServiceAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-directory Show documentation
/*
* Copyright 2015-2020 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.directory;
import static java.util.concurrent.Executors.newFixedThreadPool;
import javax.annotation.Generated;
import com.amazonaws.services.directory.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 Directory Service asynchronously. Each asynchronous method will return a Java Future object
* representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
* notification when an asynchronous operation completes.
*
* AWS Directory Service
*
* AWS Directory Service is a web service that makes it easy for you to setup and run directories in the AWS cloud, or
* connect your AWS resources with an existing on-premises Microsoft Active Directory. This guide provides detailed
* information about AWS Directory Service operations, data types, parameters, and errors. For information about AWS
* Directory Services features, see AWS Directory Service and the
* AWS Directory Service
* Administration Guide.
*
*
*
* AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms (Java,
* Ruby, .Net, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWS Directory
* Service and other AWS services. For more information about the AWS SDKs, including how to download and install them,
* see Tools for Amazon Web Services.
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSDirectoryServiceAsyncClient extends AWSDirectoryServiceClient implements AWSDirectoryServiceAsync {
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 Directory Service. 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 AWSDirectoryServiceAsyncClientBuilder#defaultClient()}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient() {
this(DefaultAWSCredentialsProviderChain.getInstance());
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service. 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 Directory Service (ex: proxy
* settings, retry counts, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AWSDirectoryServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
this(awsCredentials, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service 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 AWSDirectoryServiceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AWSDirectoryServiceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AWSDirectoryServiceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
public static AWSDirectoryServiceAsyncClientBuilder asyncBuilder() {
return AWSDirectoryServiceAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSDirectoryServiceAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Directory Service using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSDirectoryServiceAsyncClient(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 acceptSharedDirectoryAsync(AcceptSharedDirectoryRequest request) {
return acceptSharedDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptSharedDirectoryAsync(final AcceptSharedDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptSharedDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptSharedDirectoryResult call() throws Exception {
AcceptSharedDirectoryResult result = null;
try {
result = executeAcceptSharedDirectory(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 addIpRoutesAsync(AddIpRoutesRequest request) {
return addIpRoutesAsync(request, null);
}
@Override
public java.util.concurrent.Future addIpRoutesAsync(final AddIpRoutesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AddIpRoutesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AddIpRoutesResult call() throws Exception {
AddIpRoutesResult result = null;
try {
result = executeAddIpRoutes(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 addTagsToResourceAsync(AddTagsToResourceRequest request) {
return addTagsToResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future addTagsToResourceAsync(final AddTagsToResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AddTagsToResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AddTagsToResourceResult call() throws Exception {
AddTagsToResourceResult result = null;
try {
result = executeAddTagsToResource(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 cancelSchemaExtensionAsync(CancelSchemaExtensionRequest request) {
return cancelSchemaExtensionAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelSchemaExtensionAsync(final CancelSchemaExtensionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelSchemaExtensionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelSchemaExtensionResult call() throws Exception {
CancelSchemaExtensionResult result = null;
try {
result = executeCancelSchemaExtension(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 connectDirectoryAsync(ConnectDirectoryRequest request) {
return connectDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future connectDirectoryAsync(final ConnectDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConnectDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConnectDirectoryResult call() throws Exception {
ConnectDirectoryResult result = null;
try {
result = executeConnectDirectory(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 createAliasAsync(CreateAliasRequest request) {
return createAliasAsync(request, null);
}
@Override
public java.util.concurrent.Future createAliasAsync(final CreateAliasRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAliasRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAliasResult call() throws Exception {
CreateAliasResult result = null;
try {
result = executeCreateAlias(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 createComputerAsync(CreateComputerRequest request) {
return createComputerAsync(request, null);
}
@Override
public java.util.concurrent.Future createComputerAsync(final CreateComputerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateComputerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateComputerResult call() throws Exception {
CreateComputerResult result = null;
try {
result = executeCreateComputer(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 createConditionalForwarderAsync(CreateConditionalForwarderRequest request) {
return createConditionalForwarderAsync(request, null);
}
@Override
public java.util.concurrent.Future createConditionalForwarderAsync(final CreateConditionalForwarderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConditionalForwarderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConditionalForwarderResult call() throws Exception {
CreateConditionalForwarderResult result = null;
try {
result = executeCreateConditionalForwarder(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 createDirectoryAsync(CreateDirectoryRequest request) {
return createDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future createDirectoryAsync(final CreateDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDirectoryResult call() throws Exception {
CreateDirectoryResult result = null;
try {
result = executeCreateDirectory(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 createLogSubscriptionAsync(CreateLogSubscriptionRequest request) {
return createLogSubscriptionAsync(request, null);
}
@Override
public java.util.concurrent.Future createLogSubscriptionAsync(final CreateLogSubscriptionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLogSubscriptionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLogSubscriptionResult call() throws Exception {
CreateLogSubscriptionResult result = null;
try {
result = executeCreateLogSubscription(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 createMicrosoftADAsync(CreateMicrosoftADRequest request) {
return createMicrosoftADAsync(request, null);
}
@Override
public java.util.concurrent.Future createMicrosoftADAsync(final CreateMicrosoftADRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateMicrosoftADRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateMicrosoftADResult call() throws Exception {
CreateMicrosoftADResult result = null;
try {
result = executeCreateMicrosoftAD(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 createSnapshotAsync(CreateSnapshotRequest request) {
return createSnapshotAsync(request, null);
}
@Override
public java.util.concurrent.Future createSnapshotAsync(final CreateSnapshotRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateSnapshotRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateSnapshotResult call() throws Exception {
CreateSnapshotResult result = null;
try {
result = executeCreateSnapshot(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 createTrustAsync(CreateTrustRequest request) {
return createTrustAsync(request, null);
}
@Override
public java.util.concurrent.Future createTrustAsync(final CreateTrustRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTrustRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTrustResult call() throws Exception {
CreateTrustResult result = null;
try {
result = executeCreateTrust(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 deleteConditionalForwarderAsync(DeleteConditionalForwarderRequest request) {
return deleteConditionalForwarderAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConditionalForwarderAsync(final DeleteConditionalForwarderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConditionalForwarderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConditionalForwarderResult call() throws Exception {
DeleteConditionalForwarderResult result = null;
try {
result = executeDeleteConditionalForwarder(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 deleteDirectoryAsync(DeleteDirectoryRequest request) {
return deleteDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDirectoryAsync(final DeleteDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDirectoryResult call() throws Exception {
DeleteDirectoryResult result = null;
try {
result = executeDeleteDirectory(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 deleteLogSubscriptionAsync(DeleteLogSubscriptionRequest request) {
return deleteLogSubscriptionAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLogSubscriptionAsync(final DeleteLogSubscriptionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLogSubscriptionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLogSubscriptionResult call() throws Exception {
DeleteLogSubscriptionResult result = null;
try {
result = executeDeleteLogSubscription(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 deleteSnapshotAsync(DeleteSnapshotRequest request) {
return deleteSnapshotAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteSnapshotAsync(final DeleteSnapshotRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteSnapshotRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteSnapshotResult call() throws Exception {
DeleteSnapshotResult result = null;
try {
result = executeDeleteSnapshot(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 deleteTrustAsync(DeleteTrustRequest request) {
return deleteTrustAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteTrustAsync(final DeleteTrustRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteTrustRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteTrustResult call() throws Exception {
DeleteTrustResult result = null;
try {
result = executeDeleteTrust(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 deregisterCertificateAsync(DeregisterCertificateRequest request) {
return deregisterCertificateAsync(request, null);
}
@Override
public java.util.concurrent.Future deregisterCertificateAsync(final DeregisterCertificateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeregisterCertificateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeregisterCertificateResult call() throws Exception {
DeregisterCertificateResult result = null;
try {
result = executeDeregisterCertificate(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 deregisterEventTopicAsync(DeregisterEventTopicRequest request) {
return deregisterEventTopicAsync(request, null);
}
@Override
public java.util.concurrent.Future deregisterEventTopicAsync(final DeregisterEventTopicRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeregisterEventTopicRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeregisterEventTopicResult call() throws Exception {
DeregisterEventTopicResult result = null;
try {
result = executeDeregisterEventTopic(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 describeCertificateAsync(DescribeCertificateRequest request) {
return describeCertificateAsync(request, null);
}
@Override
public java.util.concurrent.Future describeCertificateAsync(final DescribeCertificateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeCertificateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeCertificateResult call() throws Exception {
DescribeCertificateResult result = null;
try {
result = executeDescribeCertificate(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 describeConditionalForwardersAsync(DescribeConditionalForwardersRequest request) {
return describeConditionalForwardersAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConditionalForwardersAsync(
final DescribeConditionalForwardersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConditionalForwardersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConditionalForwardersResult call() throws Exception {
DescribeConditionalForwardersResult result = null;
try {
result = executeDescribeConditionalForwarders(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 describeDirectoriesAsync(DescribeDirectoriesRequest request) {
return describeDirectoriesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDirectoriesAsync(final DescribeDirectoriesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDirectoriesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDirectoriesResult call() throws Exception {
DescribeDirectoriesResult result = null;
try {
result = executeDescribeDirectories(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeDirectories operation.
*
* @see #describeDirectoriesAsync(DescribeDirectoriesRequest)
*/
@Override
public java.util.concurrent.Future describeDirectoriesAsync() {
return describeDirectoriesAsync(new DescribeDirectoriesRequest());
}
/**
* Simplified method form for invoking the DescribeDirectories operation with an AsyncHandler.
*
* @see #describeDirectoriesAsync(DescribeDirectoriesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeDirectoriesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeDirectoriesAsync(new DescribeDirectoriesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeDomainControllersAsync(DescribeDomainControllersRequest request) {
return describeDomainControllersAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDomainControllersAsync(final DescribeDomainControllersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDomainControllersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDomainControllersResult call() throws Exception {
DescribeDomainControllersResult result = null;
try {
result = executeDescribeDomainControllers(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 describeEventTopicsAsync(DescribeEventTopicsRequest request) {
return describeEventTopicsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEventTopicsAsync(final DescribeEventTopicsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEventTopicsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEventTopicsResult call() throws Exception {
DescribeEventTopicsResult result = null;
try {
result = executeDescribeEventTopics(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 describeLDAPSSettingsAsync(DescribeLDAPSSettingsRequest request) {
return describeLDAPSSettingsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLDAPSSettingsAsync(final DescribeLDAPSSettingsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLDAPSSettingsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLDAPSSettingsResult call() throws Exception {
DescribeLDAPSSettingsResult result = null;
try {
result = executeDescribeLDAPSSettings(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 describeSharedDirectoriesAsync(DescribeSharedDirectoriesRequest request) {
return describeSharedDirectoriesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeSharedDirectoriesAsync(final DescribeSharedDirectoriesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeSharedDirectoriesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeSharedDirectoriesResult call() throws Exception {
DescribeSharedDirectoriesResult result = null;
try {
result = executeDescribeSharedDirectories(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 describeSnapshotsAsync(DescribeSnapshotsRequest request) {
return describeSnapshotsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeSnapshotsAsync(final DescribeSnapshotsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeSnapshotsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeSnapshotsResult call() throws Exception {
DescribeSnapshotsResult result = null;
try {
result = executeDescribeSnapshots(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the DescribeSnapshots operation.
*
* @see #describeSnapshotsAsync(DescribeSnapshotsRequest)
*/
@Override
public java.util.concurrent.Future describeSnapshotsAsync() {
return describeSnapshotsAsync(new DescribeSnapshotsRequest());
}
/**
* Simplified method form for invoking the DescribeSnapshots operation with an AsyncHandler.
*
* @see #describeSnapshotsAsync(DescribeSnapshotsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeSnapshotsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeSnapshotsAsync(new DescribeSnapshotsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeTrustsAsync(DescribeTrustsRequest request) {
return describeTrustsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTrustsAsync(final DescribeTrustsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTrustsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTrustsResult call() throws Exception {
DescribeTrustsResult result = null;
try {
result = executeDescribeTrusts(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 disableLDAPSAsync(DisableLDAPSRequest request) {
return disableLDAPSAsync(request, null);
}
@Override
public java.util.concurrent.Future disableLDAPSAsync(final DisableLDAPSRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableLDAPSRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableLDAPSResult call() throws Exception {
DisableLDAPSResult result = null;
try {
result = executeDisableLDAPS(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 disableRadiusAsync(DisableRadiusRequest request) {
return disableRadiusAsync(request, null);
}
@Override
public java.util.concurrent.Future disableRadiusAsync(final DisableRadiusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableRadiusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableRadiusResult call() throws Exception {
DisableRadiusResult result = null;
try {
result = executeDisableRadius(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 disableSsoAsync(DisableSsoRequest request) {
return disableSsoAsync(request, null);
}
@Override
public java.util.concurrent.Future disableSsoAsync(final DisableSsoRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableSsoRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableSsoResult call() throws Exception {
DisableSsoResult result = null;
try {
result = executeDisableSso(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 enableLDAPSAsync(EnableLDAPSRequest request) {
return enableLDAPSAsync(request, null);
}
@Override
public java.util.concurrent.Future enableLDAPSAsync(final EnableLDAPSRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableLDAPSRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableLDAPSResult call() throws Exception {
EnableLDAPSResult result = null;
try {
result = executeEnableLDAPS(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 enableRadiusAsync(EnableRadiusRequest request) {
return enableRadiusAsync(request, null);
}
@Override
public java.util.concurrent.Future enableRadiusAsync(final EnableRadiusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableRadiusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableRadiusResult call() throws Exception {
EnableRadiusResult result = null;
try {
result = executeEnableRadius(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 enableSsoAsync(EnableSsoRequest request) {
return enableSsoAsync(request, null);
}
@Override
public java.util.concurrent.Future enableSsoAsync(final EnableSsoRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableSsoRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableSsoResult call() throws Exception {
EnableSsoResult result = null;
try {
result = executeEnableSso(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 getDirectoryLimitsAsync(GetDirectoryLimitsRequest request) {
return getDirectoryLimitsAsync(request, null);
}
@Override
public java.util.concurrent.Future getDirectoryLimitsAsync(final GetDirectoryLimitsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDirectoryLimitsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDirectoryLimitsResult call() throws Exception {
GetDirectoryLimitsResult result = null;
try {
result = executeGetDirectoryLimits(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the GetDirectoryLimits operation.
*
* @see #getDirectoryLimitsAsync(GetDirectoryLimitsRequest)
*/
@Override
public java.util.concurrent.Future getDirectoryLimitsAsync() {
return getDirectoryLimitsAsync(new GetDirectoryLimitsRequest());
}
/**
* Simplified method form for invoking the GetDirectoryLimits operation with an AsyncHandler.
*
* @see #getDirectoryLimitsAsync(GetDirectoryLimitsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future getDirectoryLimitsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return getDirectoryLimitsAsync(new GetDirectoryLimitsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future getSnapshotLimitsAsync(GetSnapshotLimitsRequest request) {
return getSnapshotLimitsAsync(request, null);
}
@Override
public java.util.concurrent.Future getSnapshotLimitsAsync(final GetSnapshotLimitsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSnapshotLimitsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSnapshotLimitsResult call() throws Exception {
GetSnapshotLimitsResult result = null;
try {
result = executeGetSnapshotLimits(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 listCertificatesAsync(ListCertificatesRequest request) {
return listCertificatesAsync(request, null);
}
@Override
public java.util.concurrent.Future listCertificatesAsync(final ListCertificatesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCertificatesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCertificatesResult call() throws Exception {
ListCertificatesResult result = null;
try {
result = executeListCertificates(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 listIpRoutesAsync(ListIpRoutesRequest request) {
return listIpRoutesAsync(request, null);
}
@Override
public java.util.concurrent.Future listIpRoutesAsync(final ListIpRoutesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIpRoutesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIpRoutesResult call() throws Exception {
ListIpRoutesResult result = null;
try {
result = executeListIpRoutes(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 listLogSubscriptionsAsync(ListLogSubscriptionsRequest request) {
return listLogSubscriptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listLogSubscriptionsAsync(final ListLogSubscriptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListLogSubscriptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListLogSubscriptionsResult call() throws Exception {
ListLogSubscriptionsResult result = null;
try {
result = executeListLogSubscriptions(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 listSchemaExtensionsAsync(ListSchemaExtensionsRequest request) {
return listSchemaExtensionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listSchemaExtensionsAsync(final ListSchemaExtensionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSchemaExtensionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSchemaExtensionsResult call() throws Exception {
ListSchemaExtensionsResult result = null;
try {
result = executeListSchemaExtensions(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 registerCertificateAsync(RegisterCertificateRequest request) {
return registerCertificateAsync(request, null);
}
@Override
public java.util.concurrent.Future registerCertificateAsync(final RegisterCertificateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RegisterCertificateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RegisterCertificateResult call() throws Exception {
RegisterCertificateResult result = null;
try {
result = executeRegisterCertificate(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 registerEventTopicAsync(RegisterEventTopicRequest request) {
return registerEventTopicAsync(request, null);
}
@Override
public java.util.concurrent.Future registerEventTopicAsync(final RegisterEventTopicRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RegisterEventTopicRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RegisterEventTopicResult call() throws Exception {
RegisterEventTopicResult result = null;
try {
result = executeRegisterEventTopic(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 rejectSharedDirectoryAsync(RejectSharedDirectoryRequest request) {
return rejectSharedDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future rejectSharedDirectoryAsync(final RejectSharedDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RejectSharedDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RejectSharedDirectoryResult call() throws Exception {
RejectSharedDirectoryResult result = null;
try {
result = executeRejectSharedDirectory(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 removeIpRoutesAsync(RemoveIpRoutesRequest request) {
return removeIpRoutesAsync(request, null);
}
@Override
public java.util.concurrent.Future removeIpRoutesAsync(final RemoveIpRoutesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RemoveIpRoutesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RemoveIpRoutesResult call() throws Exception {
RemoveIpRoutesResult result = null;
try {
result = executeRemoveIpRoutes(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 removeTagsFromResourceAsync(RemoveTagsFromResourceRequest request) {
return removeTagsFromResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future removeTagsFromResourceAsync(final RemoveTagsFromResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RemoveTagsFromResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RemoveTagsFromResourceResult call() throws Exception {
RemoveTagsFromResourceResult result = null;
try {
result = executeRemoveTagsFromResource(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 resetUserPasswordAsync(ResetUserPasswordRequest request) {
return resetUserPasswordAsync(request, null);
}
@Override
public java.util.concurrent.Future resetUserPasswordAsync(final ResetUserPasswordRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ResetUserPasswordRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ResetUserPasswordResult call() throws Exception {
ResetUserPasswordResult result = null;
try {
result = executeResetUserPassword(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 restoreFromSnapshotAsync(RestoreFromSnapshotRequest request) {
return restoreFromSnapshotAsync(request, null);
}
@Override
public java.util.concurrent.Future restoreFromSnapshotAsync(final RestoreFromSnapshotRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RestoreFromSnapshotRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RestoreFromSnapshotResult call() throws Exception {
RestoreFromSnapshotResult result = null;
try {
result = executeRestoreFromSnapshot(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 shareDirectoryAsync(ShareDirectoryRequest request) {
return shareDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future shareDirectoryAsync(final ShareDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ShareDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ShareDirectoryResult call() throws Exception {
ShareDirectoryResult result = null;
try {
result = executeShareDirectory(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 startSchemaExtensionAsync(StartSchemaExtensionRequest request) {
return startSchemaExtensionAsync(request, null);
}
@Override
public java.util.concurrent.Future startSchemaExtensionAsync(final StartSchemaExtensionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartSchemaExtensionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartSchemaExtensionResult call() throws Exception {
StartSchemaExtensionResult result = null;
try {
result = executeStartSchemaExtension(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 unshareDirectoryAsync(UnshareDirectoryRequest request) {
return unshareDirectoryAsync(request, null);
}
@Override
public java.util.concurrent.Future unshareDirectoryAsync(final UnshareDirectoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UnshareDirectoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UnshareDirectoryResult call() throws Exception {
UnshareDirectoryResult result = null;
try {
result = executeUnshareDirectory(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 updateConditionalForwarderAsync(UpdateConditionalForwarderRequest request) {
return updateConditionalForwarderAsync(request, null);
}
@Override
public java.util.concurrent.Future updateConditionalForwarderAsync(final UpdateConditionalForwarderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateConditionalForwarderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateConditionalForwarderResult call() throws Exception {
UpdateConditionalForwarderResult result = null;
try {
result = executeUpdateConditionalForwarder(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 updateNumberOfDomainControllersAsync(
UpdateNumberOfDomainControllersRequest request) {
return updateNumberOfDomainControllersAsync(request, null);
}
@Override
public java.util.concurrent.Future updateNumberOfDomainControllersAsync(
final UpdateNumberOfDomainControllersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateNumberOfDomainControllersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateNumberOfDomainControllersResult call() throws Exception {
UpdateNumberOfDomainControllersResult result = null;
try {
result = executeUpdateNumberOfDomainControllers(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 updateRadiusAsync(UpdateRadiusRequest request) {
return updateRadiusAsync(request, null);
}
@Override
public java.util.concurrent.Future updateRadiusAsync(final UpdateRadiusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateRadiusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateRadiusResult call() throws Exception {
UpdateRadiusResult result = null;
try {
result = executeUpdateRadius(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 updateTrustAsync(UpdateTrustRequest request) {
return updateTrustAsync(request, null);
}
@Override
public java.util.concurrent.Future updateTrustAsync(final UpdateTrustRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateTrustRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateTrustResult call() throws Exception {
UpdateTrustResult result = null;
try {
result = executeUpdateTrust(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 verifyTrustAsync(VerifyTrustRequest request) {
return verifyTrustAsync(request, null);
}
@Override
public java.util.concurrent.Future verifyTrustAsync(final VerifyTrustRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final VerifyTrustRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public VerifyTrustResult call() throws Exception {
VerifyTrustResult result = null;
try {
result = executeVerifyTrust(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();
}
}