com.amazonaws.services.route53domains.AmazonRoute53DomainsAsyncClient Maven / Gradle / Ivy
/*
* 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.route53domains;
import static java.util.concurrent.Executors.newFixedThreadPool;
import javax.annotation.Generated;
import com.amazonaws.services.route53domains.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 Amazon Route 53 Domains 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 Route 53 API actions let you register domain names and perform related operations.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonRoute53DomainsAsyncClient extends AmazonRoute53DomainsClient implements AmazonRoute53DomainsAsync {
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 Amazon Route 53 Domains. 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 AmazonRoute53DomainsAsyncClientBuilder#defaultClient()}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient() {
this(DefaultAWSCredentialsProviderChain.getInstance());
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains. 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 Amazon Route 53 Domains (ex:
* proxy settings, retry counts, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonRoute53DomainsAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
this(awsCredentials, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains 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 AmazonRoute53DomainsAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonRoute53DomainsAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonRoute53DomainsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
public static AmazonRoute53DomainsAsyncClientBuilder asyncBuilder() {
return AmazonRoute53DomainsAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonRoute53DomainsAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Route 53 Domains using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonRoute53DomainsAsyncClient(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 acceptDomainTransferFromAnotherAwsAccountAsync(
AcceptDomainTransferFromAnotherAwsAccountRequest request) {
return acceptDomainTransferFromAnotherAwsAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptDomainTransferFromAnotherAwsAccountAsync(
final AcceptDomainTransferFromAnotherAwsAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptDomainTransferFromAnotherAwsAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptDomainTransferFromAnotherAwsAccountResult call() throws Exception {
AcceptDomainTransferFromAnotherAwsAccountResult result = null;
try {
result = executeAcceptDomainTransferFromAnotherAwsAccount(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 associateDelegationSignerToDomainAsync(
AssociateDelegationSignerToDomainRequest request) {
return associateDelegationSignerToDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future associateDelegationSignerToDomainAsync(
final AssociateDelegationSignerToDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateDelegationSignerToDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateDelegationSignerToDomainResult call() throws Exception {
AssociateDelegationSignerToDomainResult result = null;
try {
result = executeAssociateDelegationSignerToDomain(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 cancelDomainTransferToAnotherAwsAccountAsync(
CancelDomainTransferToAnotherAwsAccountRequest request) {
return cancelDomainTransferToAnotherAwsAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelDomainTransferToAnotherAwsAccountAsync(
final CancelDomainTransferToAnotherAwsAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelDomainTransferToAnotherAwsAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelDomainTransferToAnotherAwsAccountResult call() throws Exception {
CancelDomainTransferToAnotherAwsAccountResult result = null;
try {
result = executeCancelDomainTransferToAnotherAwsAccount(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 checkDomainAvailabilityAsync(CheckDomainAvailabilityRequest request) {
return checkDomainAvailabilityAsync(request, null);
}
@Override
public java.util.concurrent.Future checkDomainAvailabilityAsync(final CheckDomainAvailabilityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CheckDomainAvailabilityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CheckDomainAvailabilityResult call() throws Exception {
CheckDomainAvailabilityResult result = null;
try {
result = executeCheckDomainAvailability(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 checkDomainTransferabilityAsync(CheckDomainTransferabilityRequest request) {
return checkDomainTransferabilityAsync(request, null);
}
@Override
public java.util.concurrent.Future checkDomainTransferabilityAsync(final CheckDomainTransferabilityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CheckDomainTransferabilityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CheckDomainTransferabilityResult call() throws Exception {
CheckDomainTransferabilityResult result = null;
try {
result = executeCheckDomainTransferability(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteDomainAsync(DeleteDomainRequest request) {
return deleteDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDomainAsync(final DeleteDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDomainResult call() throws Exception {
DeleteDomainResult result = null;
try {
result = executeDeleteDomain(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteTagsForDomainAsync(DeleteTagsForDomainRequest request) {
return deleteTagsForDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteTagsForDomainAsync(final DeleteTagsForDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteTagsForDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteTagsForDomainResult call() throws Exception {
DeleteTagsForDomainResult result = null;
try {
result = executeDeleteTagsForDomain(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 disableDomainAutoRenewAsync(DisableDomainAutoRenewRequest request) {
return disableDomainAutoRenewAsync(request, null);
}
@Override
public java.util.concurrent.Future disableDomainAutoRenewAsync(final DisableDomainAutoRenewRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableDomainAutoRenewRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableDomainAutoRenewResult call() throws Exception {
DisableDomainAutoRenewResult result = null;
try {
result = executeDisableDomainAutoRenew(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 disableDomainTransferLockAsync(DisableDomainTransferLockRequest request) {
return disableDomainTransferLockAsync(request, null);
}
@Override
public java.util.concurrent.Future disableDomainTransferLockAsync(final DisableDomainTransferLockRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableDomainTransferLockRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableDomainTransferLockResult call() throws Exception {
DisableDomainTransferLockResult result = null;
try {
result = executeDisableDomainTransferLock(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 disassociateDelegationSignerFromDomainAsync(
DisassociateDelegationSignerFromDomainRequest request) {
return disassociateDelegationSignerFromDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateDelegationSignerFromDomainAsync(
final DisassociateDelegationSignerFromDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateDelegationSignerFromDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateDelegationSignerFromDomainResult call() throws Exception {
DisassociateDelegationSignerFromDomainResult result = null;
try {
result = executeDisassociateDelegationSignerFromDomain(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 enableDomainAutoRenewAsync(EnableDomainAutoRenewRequest request) {
return enableDomainAutoRenewAsync(request, null);
}
@Override
public java.util.concurrent.Future enableDomainAutoRenewAsync(final EnableDomainAutoRenewRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableDomainAutoRenewRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableDomainAutoRenewResult call() throws Exception {
EnableDomainAutoRenewResult result = null;
try {
result = executeEnableDomainAutoRenew(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 enableDomainTransferLockAsync(EnableDomainTransferLockRequest request) {
return enableDomainTransferLockAsync(request, null);
}
@Override
public java.util.concurrent.Future enableDomainTransferLockAsync(final EnableDomainTransferLockRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableDomainTransferLockRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableDomainTransferLockResult call() throws Exception {
EnableDomainTransferLockResult result = null;
try {
result = executeEnableDomainTransferLock(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 getContactReachabilityStatusAsync(GetContactReachabilityStatusRequest request) {
return getContactReachabilityStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getContactReachabilityStatusAsync(final GetContactReachabilityStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetContactReachabilityStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetContactReachabilityStatusResult call() throws Exception {
GetContactReachabilityStatusResult result = null;
try {
result = executeGetContactReachabilityStatus(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 getDomainDetailAsync(GetDomainDetailRequest request) {
return getDomainDetailAsync(request, null);
}
@Override
public java.util.concurrent.Future getDomainDetailAsync(final GetDomainDetailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDomainDetailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDomainDetailResult call() throws Exception {
GetDomainDetailResult result = null;
try {
result = executeGetDomainDetail(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 getDomainSuggestionsAsync(GetDomainSuggestionsRequest request) {
return getDomainSuggestionsAsync(request, null);
}
@Override
public java.util.concurrent.Future getDomainSuggestionsAsync(final GetDomainSuggestionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDomainSuggestionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDomainSuggestionsResult call() throws Exception {
GetDomainSuggestionsResult result = null;
try {
result = executeGetDomainSuggestions(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 getOperationDetailAsync(GetOperationDetailRequest request) {
return getOperationDetailAsync(request, null);
}
@Override
public java.util.concurrent.Future getOperationDetailAsync(final GetOperationDetailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOperationDetailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOperationDetailResult call() throws Exception {
GetOperationDetailResult result = null;
try {
result = executeGetOperationDetail(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listDomainsAsync(ListDomainsRequest request) {
return listDomainsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDomainsAsync(final ListDomainsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDomainsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDomainsResult call() throws Exception {
ListDomainsResult result = null;
try {
result = executeListDomains(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the ListDomains operation.
*
* @see #listDomainsAsync(ListDomainsRequest)
*/
@Override
public java.util.concurrent.Future listDomainsAsync() {
return listDomainsAsync(new ListDomainsRequest());
}
/**
* Simplified method form for invoking the ListDomains operation with an AsyncHandler.
*
* @see #listDomainsAsync(ListDomainsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future listDomainsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return listDomainsAsync(new ListDomainsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future listOperationsAsync(ListOperationsRequest request) {
return listOperationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listOperationsAsync(final ListOperationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListOperationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListOperationsResult call() throws Exception {
ListOperationsResult result = null;
try {
result = executeListOperations(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 ListOperations operation.
*
* @see #listOperationsAsync(ListOperationsRequest)
*/
@Override
public java.util.concurrent.Future listOperationsAsync() {
return listOperationsAsync(new ListOperationsRequest());
}
/**
* Simplified method form for invoking the ListOperations operation with an AsyncHandler.
*
* @see #listOperationsAsync(ListOperationsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future listOperationsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return listOperationsAsync(new ListOperationsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future listPricesAsync(ListPricesRequest request) {
return listPricesAsync(request, null);
}
@Override
public java.util.concurrent.Future listPricesAsync(final ListPricesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPricesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPricesResult call() throws Exception {
ListPricesResult result = null;
try {
result = executeListPrices(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 listTagsForDomainAsync(ListTagsForDomainRequest request) {
return listTagsForDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future listTagsForDomainAsync(final ListTagsForDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTagsForDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTagsForDomainResult call() throws Exception {
ListTagsForDomainResult result = null;
try {
result = executeListTagsForDomain(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 pushDomainAsync(PushDomainRequest request) {
return pushDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future pushDomainAsync(final PushDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PushDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PushDomainResult call() throws Exception {
PushDomainResult result = null;
try {
result = executePushDomain(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 registerDomainAsync(RegisterDomainRequest request) {
return registerDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future registerDomainAsync(final RegisterDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RegisterDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RegisterDomainResult call() throws Exception {
RegisterDomainResult result = null;
try {
result = executeRegisterDomain(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 rejectDomainTransferFromAnotherAwsAccountAsync(
RejectDomainTransferFromAnotherAwsAccountRequest request) {
return rejectDomainTransferFromAnotherAwsAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future rejectDomainTransferFromAnotherAwsAccountAsync(
final RejectDomainTransferFromAnotherAwsAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RejectDomainTransferFromAnotherAwsAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RejectDomainTransferFromAnotherAwsAccountResult call() throws Exception {
RejectDomainTransferFromAnotherAwsAccountResult result = null;
try {
result = executeRejectDomainTransferFromAnotherAwsAccount(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 renewDomainAsync(RenewDomainRequest request) {
return renewDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future renewDomainAsync(final RenewDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RenewDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RenewDomainResult call() throws Exception {
RenewDomainResult result = null;
try {
result = executeRenewDomain(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 resendContactReachabilityEmailAsync(ResendContactReachabilityEmailRequest request) {
return resendContactReachabilityEmailAsync(request, null);
}
@Override
public java.util.concurrent.Future resendContactReachabilityEmailAsync(
final ResendContactReachabilityEmailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ResendContactReachabilityEmailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ResendContactReachabilityEmailResult call() throws Exception {
ResendContactReachabilityEmailResult result = null;
try {
result = executeResendContactReachabilityEmail(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 resendOperationAuthorizationAsync(ResendOperationAuthorizationRequest request) {
return resendOperationAuthorizationAsync(request, null);
}
@Override
public java.util.concurrent.Future resendOperationAuthorizationAsync(final ResendOperationAuthorizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ResendOperationAuthorizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ResendOperationAuthorizationResult call() throws Exception {
ResendOperationAuthorizationResult result = null;
try {
result = executeResendOperationAuthorization(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 retrieveDomainAuthCodeAsync(RetrieveDomainAuthCodeRequest request) {
return retrieveDomainAuthCodeAsync(request, null);
}
@Override
public java.util.concurrent.Future retrieveDomainAuthCodeAsync(final RetrieveDomainAuthCodeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RetrieveDomainAuthCodeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RetrieveDomainAuthCodeResult call() throws Exception {
RetrieveDomainAuthCodeResult result = null;
try {
result = executeRetrieveDomainAuthCode(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 transferDomainAsync(TransferDomainRequest request) {
return transferDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future transferDomainAsync(final TransferDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TransferDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TransferDomainResult call() throws Exception {
TransferDomainResult result = null;
try {
result = executeTransferDomain(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 transferDomainToAnotherAwsAccountAsync(
TransferDomainToAnotherAwsAccountRequest request) {
return transferDomainToAnotherAwsAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future transferDomainToAnotherAwsAccountAsync(
final TransferDomainToAnotherAwsAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TransferDomainToAnotherAwsAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TransferDomainToAnotherAwsAccountResult call() throws Exception {
TransferDomainToAnotherAwsAccountResult result = null;
try {
result = executeTransferDomainToAnotherAwsAccount(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 updateDomainContactAsync(UpdateDomainContactRequest request) {
return updateDomainContactAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDomainContactAsync(final UpdateDomainContactRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDomainContactRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDomainContactResult call() throws Exception {
UpdateDomainContactResult result = null;
try {
result = executeUpdateDomainContact(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 updateDomainContactPrivacyAsync(UpdateDomainContactPrivacyRequest request) {
return updateDomainContactPrivacyAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDomainContactPrivacyAsync(final UpdateDomainContactPrivacyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDomainContactPrivacyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDomainContactPrivacyResult call() throws Exception {
UpdateDomainContactPrivacyResult result = null;
try {
result = executeUpdateDomainContactPrivacy(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 updateDomainNameserversAsync(UpdateDomainNameserversRequest request) {
return updateDomainNameserversAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDomainNameserversAsync(final UpdateDomainNameserversRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDomainNameserversRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDomainNameserversResult call() throws Exception {
UpdateDomainNameserversResult result = null;
try {
result = executeUpdateDomainNameservers(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 updateTagsForDomainAsync(UpdateTagsForDomainRequest request) {
return updateTagsForDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future updateTagsForDomainAsync(final UpdateTagsForDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateTagsForDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateTagsForDomainResult call() throws Exception {
UpdateTagsForDomainResult result = null;
try {
result = executeUpdateTagsForDomain(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 viewBillingAsync(ViewBillingRequest request) {
return viewBillingAsync(request, null);
}
@Override
public java.util.concurrent.Future viewBillingAsync(final ViewBillingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ViewBillingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ViewBillingResult call() throws Exception {
ViewBillingResult result = null;
try {
result = executeViewBilling(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();
}
}