com.amazonaws.services.directconnect.AmazonDirectConnectAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-directconnect Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.directconnect;
import static java.util.concurrent.Executors.newFixedThreadPool;
import javax.annotation.Generated;
import com.amazonaws.services.directconnect.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 AWS Direct Connect 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.
*
*
* Direct Connect links your internal network to an Direct Connect location over a standard Ethernet fiber-optic cable.
* One end of the cable is connected to your router, the other to an Direct Connect router. With this connection in
* place, you can create virtual interfaces directly to the Amazon Web Services Cloud (for example, to Amazon EC2 and
* Amazon S3) and to Amazon VPC, bypassing Internet service providers in your network path. A connection provides access
* to all Amazon Web Services Regions except the China (Beijing) and (China) Ningxia Regions. Amazon Web Services
* resources in the China Regions can only be accessed through locations associated with those Regions.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonDirectConnectAsyncClient extends AmazonDirectConnectClient implements AmazonDirectConnectAsync {
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 AWS Direct Connect. 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 AmazonDirectConnectAsyncClientBuilder#defaultClient()}
*/
@Deprecated
public AmazonDirectConnectAsyncClient() {
this(DefaultAWSCredentialsProviderChain.getInstance());
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect. 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 AWS Direct Connect (ex: proxy
* settings, retry counts, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonDirectConnectAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
this(awsCredentials, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect 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 AmazonDirectConnectAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonDirectConnectAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonDirectConnectAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
public static AmazonDirectConnectAsyncClientBuilder asyncBuilder() {
return AmazonDirectConnectAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonDirectConnectAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Direct Connect using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonDirectConnectAsyncClient(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 acceptDirectConnectGatewayAssociationProposalAsync(
AcceptDirectConnectGatewayAssociationProposalRequest request) {
return acceptDirectConnectGatewayAssociationProposalAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptDirectConnectGatewayAssociationProposalAsync(
final AcceptDirectConnectGatewayAssociationProposalRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptDirectConnectGatewayAssociationProposalRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptDirectConnectGatewayAssociationProposalResult call() throws Exception {
AcceptDirectConnectGatewayAssociationProposalResult result = null;
try {
result = executeAcceptDirectConnectGatewayAssociationProposal(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future allocateConnectionOnInterconnectAsync(
AllocateConnectionOnInterconnectRequest request) {
return allocateConnectionOnInterconnectAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future allocateConnectionOnInterconnectAsync(
final AllocateConnectionOnInterconnectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocateConnectionOnInterconnectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocateConnectionOnInterconnectResult call() throws Exception {
AllocateConnectionOnInterconnectResult result = null;
try {
result = executeAllocateConnectionOnInterconnect(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 allocateHostedConnectionAsync(AllocateHostedConnectionRequest request) {
return allocateHostedConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future allocateHostedConnectionAsync(final AllocateHostedConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocateHostedConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocateHostedConnectionResult call() throws Exception {
AllocateHostedConnectionResult result = null;
try {
result = executeAllocateHostedConnection(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 allocatePrivateVirtualInterfaceAsync(
AllocatePrivateVirtualInterfaceRequest request) {
return allocatePrivateVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future allocatePrivateVirtualInterfaceAsync(
final AllocatePrivateVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocatePrivateVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocatePrivateVirtualInterfaceResult call() throws Exception {
AllocatePrivateVirtualInterfaceResult result = null;
try {
result = executeAllocatePrivateVirtualInterface(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 allocatePublicVirtualInterfaceAsync(AllocatePublicVirtualInterfaceRequest request) {
return allocatePublicVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future allocatePublicVirtualInterfaceAsync(
final AllocatePublicVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocatePublicVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocatePublicVirtualInterfaceResult call() throws Exception {
AllocatePublicVirtualInterfaceResult result = null;
try {
result = executeAllocatePublicVirtualInterface(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 allocateTransitVirtualInterfaceAsync(
AllocateTransitVirtualInterfaceRequest request) {
return allocateTransitVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future allocateTransitVirtualInterfaceAsync(
final AllocateTransitVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocateTransitVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocateTransitVirtualInterfaceResult call() throws Exception {
AllocateTransitVirtualInterfaceResult result = null;
try {
result = executeAllocateTransitVirtualInterface(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 associateConnectionWithLagAsync(AssociateConnectionWithLagRequest request) {
return associateConnectionWithLagAsync(request, null);
}
@Override
public java.util.concurrent.Future associateConnectionWithLagAsync(final AssociateConnectionWithLagRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateConnectionWithLagRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateConnectionWithLagResult call() throws Exception {
AssociateConnectionWithLagResult result = null;
try {
result = executeAssociateConnectionWithLag(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 associateHostedConnectionAsync(AssociateHostedConnectionRequest request) {
return associateHostedConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future associateHostedConnectionAsync(final AssociateHostedConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateHostedConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateHostedConnectionResult call() throws Exception {
AssociateHostedConnectionResult result = null;
try {
result = executeAssociateHostedConnection(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 associateMacSecKeyAsync(AssociateMacSecKeyRequest request) {
return associateMacSecKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future associateMacSecKeyAsync(final AssociateMacSecKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateMacSecKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateMacSecKeyResult call() throws Exception {
AssociateMacSecKeyResult result = null;
try {
result = executeAssociateMacSecKey(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 associateVirtualInterfaceAsync(AssociateVirtualInterfaceRequest request) {
return associateVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future associateVirtualInterfaceAsync(final AssociateVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateVirtualInterfaceResult call() throws Exception {
AssociateVirtualInterfaceResult result = null;
try {
result = executeAssociateVirtualInterface(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 confirmConnectionAsync(ConfirmConnectionRequest request) {
return confirmConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future confirmConnectionAsync(final ConfirmConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfirmConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfirmConnectionResult call() throws Exception {
ConfirmConnectionResult result = null;
try {
result = executeConfirmConnection(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 confirmCustomerAgreementAsync(ConfirmCustomerAgreementRequest request) {
return confirmCustomerAgreementAsync(request, null);
}
@Override
public java.util.concurrent.Future confirmCustomerAgreementAsync(final ConfirmCustomerAgreementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfirmCustomerAgreementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfirmCustomerAgreementResult call() throws Exception {
ConfirmCustomerAgreementResult result = null;
try {
result = executeConfirmCustomerAgreement(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 confirmPrivateVirtualInterfaceAsync(ConfirmPrivateVirtualInterfaceRequest request) {
return confirmPrivateVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future confirmPrivateVirtualInterfaceAsync(
final ConfirmPrivateVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfirmPrivateVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfirmPrivateVirtualInterfaceResult call() throws Exception {
ConfirmPrivateVirtualInterfaceResult result = null;
try {
result = executeConfirmPrivateVirtualInterface(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 confirmPublicVirtualInterfaceAsync(ConfirmPublicVirtualInterfaceRequest request) {
return confirmPublicVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future confirmPublicVirtualInterfaceAsync(
final ConfirmPublicVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfirmPublicVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfirmPublicVirtualInterfaceResult call() throws Exception {
ConfirmPublicVirtualInterfaceResult result = null;
try {
result = executeConfirmPublicVirtualInterface(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 confirmTransitVirtualInterfaceAsync(ConfirmTransitVirtualInterfaceRequest request) {
return confirmTransitVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future confirmTransitVirtualInterfaceAsync(
final ConfirmTransitVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfirmTransitVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfirmTransitVirtualInterfaceResult call() throws Exception {
ConfirmTransitVirtualInterfaceResult result = null;
try {
result = executeConfirmTransitVirtualInterface(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 createBGPPeerAsync(CreateBGPPeerRequest request) {
return createBGPPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future createBGPPeerAsync(final CreateBGPPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateBGPPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateBGPPeerResult call() throws Exception {
CreateBGPPeerResult result = null;
try {
result = executeCreateBGPPeer(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 createConnectionAsync(CreateConnectionRequest request) {
return createConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future createConnectionAsync(final CreateConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConnectionResult call() throws Exception {
CreateConnectionResult result = null;
try {
result = executeCreateConnection(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 createDirectConnectGatewayAsync(CreateDirectConnectGatewayRequest request) {
return createDirectConnectGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future createDirectConnectGatewayAsync(final CreateDirectConnectGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDirectConnectGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDirectConnectGatewayResult call() throws Exception {
CreateDirectConnectGatewayResult result = null;
try {
result = executeCreateDirectConnectGateway(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 createDirectConnectGatewayAssociationAsync(
CreateDirectConnectGatewayAssociationRequest request) {
return createDirectConnectGatewayAssociationAsync(request, null);
}
@Override
public java.util.concurrent.Future createDirectConnectGatewayAssociationAsync(
final CreateDirectConnectGatewayAssociationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDirectConnectGatewayAssociationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDirectConnectGatewayAssociationResult call() throws Exception {
CreateDirectConnectGatewayAssociationResult result = null;
try {
result = executeCreateDirectConnectGatewayAssociation(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 createDirectConnectGatewayAssociationProposalAsync(
CreateDirectConnectGatewayAssociationProposalRequest request) {
return createDirectConnectGatewayAssociationProposalAsync(request, null);
}
@Override
public java.util.concurrent.Future createDirectConnectGatewayAssociationProposalAsync(
final CreateDirectConnectGatewayAssociationProposalRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDirectConnectGatewayAssociationProposalRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDirectConnectGatewayAssociationProposalResult call() throws Exception {
CreateDirectConnectGatewayAssociationProposalResult result = null;
try {
result = executeCreateDirectConnectGatewayAssociationProposal(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 createInterconnectAsync(CreateInterconnectRequest request) {
return createInterconnectAsync(request, null);
}
@Override
public java.util.concurrent.Future createInterconnectAsync(final CreateInterconnectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateInterconnectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateInterconnectResult call() throws Exception {
CreateInterconnectResult result = null;
try {
result = executeCreateInterconnect(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 createLagAsync(CreateLagRequest request) {
return createLagAsync(request, null);
}
@Override
public java.util.concurrent.Future createLagAsync(final CreateLagRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLagRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLagResult call() throws Exception {
CreateLagResult result = null;
try {
result = executeCreateLag(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 createPrivateVirtualInterfaceAsync(CreatePrivateVirtualInterfaceRequest request) {
return createPrivateVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future createPrivateVirtualInterfaceAsync(
final CreatePrivateVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePrivateVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePrivateVirtualInterfaceResult call() throws Exception {
CreatePrivateVirtualInterfaceResult result = null;
try {
result = executeCreatePrivateVirtualInterface(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 createPublicVirtualInterfaceAsync(CreatePublicVirtualInterfaceRequest request) {
return createPublicVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future createPublicVirtualInterfaceAsync(final CreatePublicVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePublicVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePublicVirtualInterfaceResult call() throws Exception {
CreatePublicVirtualInterfaceResult result = null;
try {
result = executeCreatePublicVirtualInterface(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 createTransitVirtualInterfaceAsync(CreateTransitVirtualInterfaceRequest request) {
return createTransitVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future createTransitVirtualInterfaceAsync(
final CreateTransitVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTransitVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTransitVirtualInterfaceResult call() throws Exception {
CreateTransitVirtualInterfaceResult result = null;
try {
result = executeCreateTransitVirtualInterface(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 deleteBGPPeerAsync(DeleteBGPPeerRequest request) {
return deleteBGPPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteBGPPeerAsync(final DeleteBGPPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteBGPPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteBGPPeerResult call() throws Exception {
DeleteBGPPeerResult result = null;
try {
result = executeDeleteBGPPeer(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 deleteConnectionAsync(DeleteConnectionRequest request) {
return deleteConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConnectionAsync(final DeleteConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConnectionResult call() throws Exception {
DeleteConnectionResult result = null;
try {
result = executeDeleteConnection(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 deleteDirectConnectGatewayAsync(DeleteDirectConnectGatewayRequest request) {
return deleteDirectConnectGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDirectConnectGatewayAsync(final DeleteDirectConnectGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDirectConnectGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDirectConnectGatewayResult call() throws Exception {
DeleteDirectConnectGatewayResult result = null;
try {
result = executeDeleteDirectConnectGateway(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 deleteDirectConnectGatewayAssociationAsync(
DeleteDirectConnectGatewayAssociationRequest request) {
return deleteDirectConnectGatewayAssociationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDirectConnectGatewayAssociationAsync(
final DeleteDirectConnectGatewayAssociationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDirectConnectGatewayAssociationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDirectConnectGatewayAssociationResult call() throws Exception {
DeleteDirectConnectGatewayAssociationResult result = null;
try {
result = executeDeleteDirectConnectGatewayAssociation(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 deleteDirectConnectGatewayAssociationProposalAsync(
DeleteDirectConnectGatewayAssociationProposalRequest request) {
return deleteDirectConnectGatewayAssociationProposalAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDirectConnectGatewayAssociationProposalAsync(
final DeleteDirectConnectGatewayAssociationProposalRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDirectConnectGatewayAssociationProposalRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDirectConnectGatewayAssociationProposalResult call() throws Exception {
DeleteDirectConnectGatewayAssociationProposalResult result = null;
try {
result = executeDeleteDirectConnectGatewayAssociationProposal(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 deleteInterconnectAsync(DeleteInterconnectRequest request) {
return deleteInterconnectAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteInterconnectAsync(final DeleteInterconnectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteInterconnectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteInterconnectResult call() throws Exception {
DeleteInterconnectResult result = null;
try {
result = executeDeleteInterconnect(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 deleteLagAsync(DeleteLagRequest request) {
return deleteLagAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLagAsync(final DeleteLagRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLagRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLagResult call() throws Exception {
DeleteLagResult result = null;
try {
result = executeDeleteLag(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 deleteVirtualInterfaceAsync(DeleteVirtualInterfaceRequest request) {
return deleteVirtualInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteVirtualInterfaceAsync(final DeleteVirtualInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteVirtualInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteVirtualInterfaceResult call() throws Exception {
DeleteVirtualInterfaceResult result = null;
try {
result = executeDeleteVirtualInterface(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeConnectionLoaAsync(DescribeConnectionLoaRequest request) {
return describeConnectionLoaAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeConnectionLoaAsync(final DescribeConnectionLoaRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectionLoaRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectionLoaResult call() throws Exception {
DescribeConnectionLoaResult result = null;
try {
result = executeDescribeConnectionLoa(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 describeConnectionsAsync(DescribeConnectionsRequest request) {
return describeConnectionsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConnectionsAsync(final DescribeConnectionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectionsResult call() throws Exception {
DescribeConnectionsResult result = null;
try {
result = executeDescribeConnections(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 DescribeConnections operation.
*
* @see #describeConnectionsAsync(DescribeConnectionsRequest)
*/
@Override
public java.util.concurrent.Future describeConnectionsAsync() {
return describeConnectionsAsync(new DescribeConnectionsRequest());
}
/**
* Simplified method form for invoking the DescribeConnections operation with an AsyncHandler.
*
* @see #describeConnectionsAsync(DescribeConnectionsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeConnectionsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeConnectionsAsync(new DescribeConnectionsRequest(), asyncHandler);
}
@Override
@Deprecated
public java.util.concurrent.Future describeConnectionsOnInterconnectAsync(
DescribeConnectionsOnInterconnectRequest request) {
return describeConnectionsOnInterconnectAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeConnectionsOnInterconnectAsync(
final DescribeConnectionsOnInterconnectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectionsOnInterconnectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectionsOnInterconnectResult call() throws Exception {
DescribeConnectionsOnInterconnectResult result = null;
try {
result = executeDescribeConnectionsOnInterconnect(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 describeCustomerMetadataAsync(DescribeCustomerMetadataRequest request) {
return describeCustomerMetadataAsync(request, null);
}
@Override
public java.util.concurrent.Future describeCustomerMetadataAsync(final DescribeCustomerMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeCustomerMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeCustomerMetadataResult call() throws Exception {
DescribeCustomerMetadataResult result = null;
try {
result = executeDescribeCustomerMetadata(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 describeDirectConnectGatewayAssociationProposalsAsync(
DescribeDirectConnectGatewayAssociationProposalsRequest request) {
return describeDirectConnectGatewayAssociationProposalsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDirectConnectGatewayAssociationProposalsAsync(
final DescribeDirectConnectGatewayAssociationProposalsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDirectConnectGatewayAssociationProposalsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDirectConnectGatewayAssociationProposalsResult call() throws Exception {
DescribeDirectConnectGatewayAssociationProposalsResult result = null;
try {
result = executeDescribeDirectConnectGatewayAssociationProposals(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 describeDirectConnectGatewayAssociationsAsync(
DescribeDirectConnectGatewayAssociationsRequest request) {
return describeDirectConnectGatewayAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDirectConnectGatewayAssociationsAsync(
final DescribeDirectConnectGatewayAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDirectConnectGatewayAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDirectConnectGatewayAssociationsResult call() throws Exception {
DescribeDirectConnectGatewayAssociationsResult result = null;
try {
result = executeDescribeDirectConnectGatewayAssociations(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 describeDirectConnectGatewayAttachmentsAsync(
DescribeDirectConnectGatewayAttachmentsRequest request) {
return describeDirectConnectGatewayAttachmentsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDirectConnectGatewayAttachmentsAsync(
final DescribeDirectConnectGatewayAttachmentsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDirectConnectGatewayAttachmentsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDirectConnectGatewayAttachmentsResult call() throws Exception {
DescribeDirectConnectGatewayAttachmentsResult result = null;
try {
result = executeDescribeDirectConnectGatewayAttachments(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 describeDirectConnectGatewaysAsync(DescribeDirectConnectGatewaysRequest request) {
return describeDirectConnectGatewaysAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDirectConnectGatewaysAsync(
final DescribeDirectConnectGatewaysRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDirectConnectGatewaysRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDirectConnectGatewaysResult call() throws Exception {
DescribeDirectConnectGatewaysResult result = null;
try {
result = executeDescribeDirectConnectGateways(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 describeHostedConnectionsAsync(DescribeHostedConnectionsRequest request) {
return describeHostedConnectionsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeHostedConnectionsAsync(final DescribeHostedConnectionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeHostedConnectionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeHostedConnectionsResult call() throws Exception {
DescribeHostedConnectionsResult result = null;
try {
result = executeDescribeHostedConnections(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeInterconnectLoaAsync(DescribeInterconnectLoaRequest request) {
return describeInterconnectLoaAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeInterconnectLoaAsync(final DescribeInterconnectLoaRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeInterconnectLoaRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeInterconnectLoaResult call() throws Exception {
DescribeInterconnectLoaResult result = null;
try {
result = executeDescribeInterconnectLoa(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 describeInterconnectsAsync(DescribeInterconnectsRequest request) {
return describeInterconnectsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeInterconnectsAsync(final DescribeInterconnectsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeInterconnectsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeInterconnectsResult call() throws Exception {
DescribeInterconnectsResult result = null;
try {
result = executeDescribeInterconnects(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 DescribeInterconnects operation.
*
* @see #describeInterconnectsAsync(DescribeInterconnectsRequest)
*/
@Override
public java.util.concurrent.Future describeInterconnectsAsync() {
return describeInterconnectsAsync(new DescribeInterconnectsRequest());
}
/**
* Simplified method form for invoking the DescribeInterconnects operation with an AsyncHandler.
*
* @see #describeInterconnectsAsync(DescribeInterconnectsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeInterconnectsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeInterconnectsAsync(new DescribeInterconnectsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeLagsAsync(DescribeLagsRequest request) {
return describeLagsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLagsAsync(final DescribeLagsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLagsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLagsResult call() throws Exception {
DescribeLagsResult result = null;
try {
result = executeDescribeLags(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 describeLoaAsync(DescribeLoaRequest request) {
return describeLoaAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLoaAsync(final DescribeLoaRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLoaRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLoaResult call() throws Exception {
DescribeLoaResult result = null;
try {
result = executeDescribeLoa(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 describeLocationsAsync(DescribeLocationsRequest request) {
return describeLocationsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationsAsync(final DescribeLocationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationsResult call() throws Exception {
DescribeLocationsResult result = null;
try {
result = executeDescribeLocations(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 DescribeLocations operation.
*
* @see #describeLocationsAsync(DescribeLocationsRequest)
*/
@Override
public java.util.concurrent.Future describeLocationsAsync() {
return describeLocationsAsync(new DescribeLocationsRequest());
}
/**
* Simplified method form for invoking the DescribeLocations operation with an AsyncHandler.
*
* @see #describeLocationsAsync(DescribeLocationsRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeLocationsAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeLocationsAsync(new DescribeLocationsRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeRouterConfigurationAsync(DescribeRouterConfigurationRequest request) {
return describeRouterConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future describeRouterConfigurationAsync(final DescribeRouterConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeRouterConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeRouterConfigurationResult call() throws Exception {
DescribeRouterConfigurationResult result = null;
try {
result = executeDescribeRouterConfiguration(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 describeTagsAsync(DescribeTagsRequest request) {
return describeTagsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTagsAsync(final DescribeTagsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTagsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTagsResult call() throws Exception {
DescribeTagsResult result = null;
try {
result = executeDescribeTags(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 describeVirtualGatewaysAsync(DescribeVirtualGatewaysRequest request) {
return describeVirtualGatewaysAsync(request, null);
}
@Override
public java.util.concurrent.Future describeVirtualGatewaysAsync(final DescribeVirtualGatewaysRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeVirtualGatewaysRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeVirtualGatewaysResult call() throws Exception {
DescribeVirtualGatewaysResult result = null;
try {
result = executeDescribeVirtualGateways(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 DescribeVirtualGateways operation.
*
* @see #describeVirtualGatewaysAsync(DescribeVirtualGatewaysRequest)
*/
@Override
public java.util.concurrent.Future describeVirtualGatewaysAsync() {
return describeVirtualGatewaysAsync(new DescribeVirtualGatewaysRequest());
}
/**
* Simplified method form for invoking the DescribeVirtualGateways operation with an AsyncHandler.
*
* @see #describeVirtualGatewaysAsync(DescribeVirtualGatewaysRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeVirtualGatewaysAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeVirtualGatewaysAsync(new DescribeVirtualGatewaysRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future describeVirtualInterfacesAsync(DescribeVirtualInterfacesRequest request) {
return describeVirtualInterfacesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeVirtualInterfacesAsync(final DescribeVirtualInterfacesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeVirtualInterfacesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeVirtualInterfacesResult call() throws Exception {
DescribeVirtualInterfacesResult result = null;
try {
result = executeDescribeVirtualInterfaces(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 DescribeVirtualInterfaces operation.
*
* @see #describeVirtualInterfacesAsync(DescribeVirtualInterfacesRequest)
*/
@Override
public java.util.concurrent.Future describeVirtualInterfacesAsync() {
return describeVirtualInterfacesAsync(new DescribeVirtualInterfacesRequest());
}
/**
* Simplified method form for invoking the DescribeVirtualInterfaces operation with an AsyncHandler.
*
* @see #describeVirtualInterfacesAsync(DescribeVirtualInterfacesRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future describeVirtualInterfacesAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return describeVirtualInterfacesAsync(new DescribeVirtualInterfacesRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future disassociateConnectionFromLagAsync(DisassociateConnectionFromLagRequest request) {
return disassociateConnectionFromLagAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateConnectionFromLagAsync(
final DisassociateConnectionFromLagRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateConnectionFromLagRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateConnectionFromLagResult call() throws Exception {
DisassociateConnectionFromLagResult result = null;
try {
result = executeDisassociateConnectionFromLag(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 disassociateMacSecKeyAsync(DisassociateMacSecKeyRequest request) {
return disassociateMacSecKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateMacSecKeyAsync(final DisassociateMacSecKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateMacSecKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateMacSecKeyResult call() throws Exception {
DisassociateMacSecKeyResult result = null;
try {
result = executeDisassociateMacSecKey(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 listVirtualInterfaceTestHistoryAsync(
ListVirtualInterfaceTestHistoryRequest request) {
return listVirtualInterfaceTestHistoryAsync(request, null);
}
@Override
public java.util.concurrent.Future listVirtualInterfaceTestHistoryAsync(
final ListVirtualInterfaceTestHistoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListVirtualInterfaceTestHistoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListVirtualInterfaceTestHistoryResult call() throws Exception {
ListVirtualInterfaceTestHistoryResult result = null;
try {
result = executeListVirtualInterfaceTestHistory(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 startBgpFailoverTestAsync(StartBgpFailoverTestRequest request) {
return startBgpFailoverTestAsync(request, null);
}
@Override
public java.util.concurrent.Future startBgpFailoverTestAsync(final StartBgpFailoverTestRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartBgpFailoverTestRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartBgpFailoverTestResult call() throws Exception {
StartBgpFailoverTestResult result = null;
try {
result = executeStartBgpFailoverTest(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 stopBgpFailoverTestAsync(StopBgpFailoverTestRequest request) {
return stopBgpFailoverTestAsync(request, null);
}
@Override
public java.util.concurrent.Future stopBgpFailoverTestAsync(final StopBgpFailoverTestRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopBgpFailoverTestRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopBgpFailoverTestResult call() throws Exception {
StopBgpFailoverTestResult result = null;
try {
result = executeStopBgpFailoverTest(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) {
return tagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TagResourceResult call() throws Exception {
TagResourceResult result = null;
try {
result = executeTagResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) {
return untagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UntagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UntagResourceResult call() throws Exception {
UntagResourceResult result = null;
try {
result = executeUntagResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future updateConnectionAsync(UpdateConnectionRequest request) {
return updateConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future updateConnectionAsync(final UpdateConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler