com.amazonaws.services.networkmanager.AWSNetworkManagerAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-networkmanager Show documentation
Show all versions of aws-java-sdk-networkmanager Show documentation
The AWS Java SDK for AWS Network Manager module holds the client classes that are used for communicating with AWS Network Manager Service
The newest version!
/*
* 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.networkmanager;
import javax.annotation.Generated;
import com.amazonaws.services.networkmanager.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing NetworkManager 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 Web Services enables you to centrally manage your Amazon Web Services Cloud WAN core network and your Transit
* Gateway network across Amazon Web Services accounts, Regions, and on-premises locations.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSNetworkManagerAsyncClient extends AWSNetworkManagerClient implements AWSNetworkManagerAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSNetworkManagerAsyncClientBuilder asyncBuilder() {
return AWSNetworkManagerAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on NetworkManager using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSNetworkManagerAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on NetworkManager using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSNetworkManagerAsyncClient(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 acceptAttachmentAsync(AcceptAttachmentRequest request) {
return acceptAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptAttachmentAsync(final AcceptAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptAttachmentResult call() throws Exception {
AcceptAttachmentResult result = null;
try {
result = executeAcceptAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateConnectPeerAsync(AssociateConnectPeerRequest request) {
return associateConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future associateConnectPeerAsync(final AssociateConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateConnectPeerResult call() throws Exception {
AssociateConnectPeerResult result = null;
try {
result = executeAssociateConnectPeer(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateCustomerGatewayAsync(AssociateCustomerGatewayRequest request) {
return associateCustomerGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future associateCustomerGatewayAsync(final AssociateCustomerGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateCustomerGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateCustomerGatewayResult call() throws Exception {
AssociateCustomerGatewayResult result = null;
try {
result = executeAssociateCustomerGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateLinkAsync(AssociateLinkRequest request) {
return associateLinkAsync(request, null);
}
@Override
public java.util.concurrent.Future associateLinkAsync(final AssociateLinkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateLinkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateLinkResult call() throws Exception {
AssociateLinkResult result = null;
try {
result = executeAssociateLink(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateTransitGatewayConnectPeerAsync(
AssociateTransitGatewayConnectPeerRequest request) {
return associateTransitGatewayConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future associateTransitGatewayConnectPeerAsync(
final AssociateTransitGatewayConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateTransitGatewayConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateTransitGatewayConnectPeerResult call() throws Exception {
AssociateTransitGatewayConnectPeerResult result = null;
try {
result = executeAssociateTransitGatewayConnectPeer(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createConnectAttachmentAsync(CreateConnectAttachmentRequest request) {
return createConnectAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future createConnectAttachmentAsync(final CreateConnectAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConnectAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConnectAttachmentResult call() throws Exception {
CreateConnectAttachmentResult result = null;
try {
result = executeCreateConnectAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createConnectPeerAsync(CreateConnectPeerRequest request) {
return createConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future createConnectPeerAsync(final CreateConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConnectPeerResult call() throws Exception {
CreateConnectPeerResult result = null;
try {
result = executeCreateConnectPeer(finalRequest);
} catch (Exception 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 createCoreNetworkAsync(CreateCoreNetworkRequest request) {
return createCoreNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future createCoreNetworkAsync(final CreateCoreNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCoreNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCoreNetworkResult call() throws Exception {
CreateCoreNetworkResult result = null;
try {
result = executeCreateCoreNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createDeviceAsync(CreateDeviceRequest request) {
return createDeviceAsync(request, null);
}
@Override
public java.util.concurrent.Future createDeviceAsync(final CreateDeviceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDeviceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDeviceResult call() throws Exception {
CreateDeviceResult result = null;
try {
result = executeCreateDevice(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createGlobalNetworkAsync(CreateGlobalNetworkRequest request) {
return createGlobalNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future createGlobalNetworkAsync(final CreateGlobalNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateGlobalNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateGlobalNetworkResult call() throws Exception {
CreateGlobalNetworkResult result = null;
try {
result = executeCreateGlobalNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createLinkAsync(CreateLinkRequest request) {
return createLinkAsync(request, null);
}
@Override
public java.util.concurrent.Future createLinkAsync(final CreateLinkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLinkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLinkResult call() throws Exception {
CreateLinkResult result = null;
try {
result = executeCreateLink(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createSiteAsync(CreateSiteRequest request) {
return createSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future createSiteAsync(final CreateSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateSiteResult call() throws Exception {
CreateSiteResult result = null;
try {
result = executeCreateSite(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createSiteToSiteVpnAttachmentAsync(CreateSiteToSiteVpnAttachmentRequest request) {
return createSiteToSiteVpnAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future createSiteToSiteVpnAttachmentAsync(
final CreateSiteToSiteVpnAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateSiteToSiteVpnAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateSiteToSiteVpnAttachmentResult call() throws Exception {
CreateSiteToSiteVpnAttachmentResult result = null;
try {
result = executeCreateSiteToSiteVpnAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createTransitGatewayPeeringAsync(CreateTransitGatewayPeeringRequest request) {
return createTransitGatewayPeeringAsync(request, null);
}
@Override
public java.util.concurrent.Future createTransitGatewayPeeringAsync(final CreateTransitGatewayPeeringRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTransitGatewayPeeringRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTransitGatewayPeeringResult call() throws Exception {
CreateTransitGatewayPeeringResult result = null;
try {
result = executeCreateTransitGatewayPeering(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createTransitGatewayRouteTableAttachmentAsync(
CreateTransitGatewayRouteTableAttachmentRequest request) {
return createTransitGatewayRouteTableAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future createTransitGatewayRouteTableAttachmentAsync(
final CreateTransitGatewayRouteTableAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTransitGatewayRouteTableAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTransitGatewayRouteTableAttachmentResult call() throws Exception {
CreateTransitGatewayRouteTableAttachmentResult result = null;
try {
result = executeCreateTransitGatewayRouteTableAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createVpcAttachmentAsync(CreateVpcAttachmentRequest request) {
return createVpcAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future createVpcAttachmentAsync(final CreateVpcAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateVpcAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateVpcAttachmentResult call() throws Exception {
CreateVpcAttachmentResult result = null;
try {
result = executeCreateVpcAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteAttachmentAsync(DeleteAttachmentRequest request) {
return deleteAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAttachmentAsync(final DeleteAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAttachmentResult call() throws Exception {
DeleteAttachmentResult result = null;
try {
result = executeDeleteAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteConnectPeerAsync(DeleteConnectPeerRequest request) {
return deleteConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConnectPeerAsync(final DeleteConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConnectPeerResult call() throws Exception {
DeleteConnectPeerResult result = null;
try {
result = executeDeleteConnectPeer(finalRequest);
} catch (Exception 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 deleteCoreNetworkAsync(DeleteCoreNetworkRequest request) {
return deleteCoreNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteCoreNetworkAsync(final DeleteCoreNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteCoreNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteCoreNetworkResult call() throws Exception {
DeleteCoreNetworkResult result = null;
try {
result = executeDeleteCoreNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteCoreNetworkPolicyVersionAsync(DeleteCoreNetworkPolicyVersionRequest request) {
return deleteCoreNetworkPolicyVersionAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteCoreNetworkPolicyVersionAsync(
final DeleteCoreNetworkPolicyVersionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteCoreNetworkPolicyVersionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteCoreNetworkPolicyVersionResult call() throws Exception {
DeleteCoreNetworkPolicyVersionResult result = null;
try {
result = executeDeleteCoreNetworkPolicyVersion(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteDeviceAsync(DeleteDeviceRequest request) {
return deleteDeviceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDeviceAsync(final DeleteDeviceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDeviceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDeviceResult call() throws Exception {
DeleteDeviceResult result = null;
try {
result = executeDeleteDevice(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteGlobalNetworkAsync(DeleteGlobalNetworkRequest request) {
return deleteGlobalNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteGlobalNetworkAsync(final DeleteGlobalNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteGlobalNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteGlobalNetworkResult call() throws Exception {
DeleteGlobalNetworkResult result = null;
try {
result = executeDeleteGlobalNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteLinkAsync(DeleteLinkRequest request) {
return deleteLinkAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLinkAsync(final DeleteLinkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLinkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLinkResult call() throws Exception {
DeleteLinkResult result = null;
try {
result = executeDeleteLink(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deletePeeringAsync(DeletePeeringRequest request) {
return deletePeeringAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePeeringAsync(final DeletePeeringRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePeeringRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePeeringResult call() throws Exception {
DeletePeeringResult result = null;
try {
result = executeDeletePeering(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteResourcePolicyAsync(DeleteResourcePolicyRequest request) {
return deleteResourcePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteResourcePolicyAsync(final DeleteResourcePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteResourcePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteResourcePolicyResult call() throws Exception {
DeleteResourcePolicyResult result = null;
try {
result = executeDeleteResourcePolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteSiteAsync(DeleteSiteRequest request) {
return deleteSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteSiteAsync(final DeleteSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteSiteResult call() throws Exception {
DeleteSiteResult result = null;
try {
result = executeDeleteSite(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deregisterTransitGatewayAsync(DeregisterTransitGatewayRequest request) {
return deregisterTransitGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future deregisterTransitGatewayAsync(final DeregisterTransitGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeregisterTransitGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeregisterTransitGatewayResult call() throws Exception {
DeregisterTransitGatewayResult result = null;
try {
result = executeDeregisterTransitGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future describeGlobalNetworksAsync(DescribeGlobalNetworksRequest request) {
return describeGlobalNetworksAsync(request, null);
}
@Override
public java.util.concurrent.Future describeGlobalNetworksAsync(final DescribeGlobalNetworksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeGlobalNetworksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeGlobalNetworksResult call() throws Exception {
DescribeGlobalNetworksResult result = null;
try {
result = executeDescribeGlobalNetworks(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future disassociateConnectPeerAsync(DisassociateConnectPeerRequest request) {
return disassociateConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateConnectPeerAsync(final DisassociateConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateConnectPeerResult call() throws Exception {
DisassociateConnectPeerResult result = null;
try {
result = executeDisassociateConnectPeer(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future disassociateCustomerGatewayAsync(DisassociateCustomerGatewayRequest request) {
return disassociateCustomerGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateCustomerGatewayAsync(final DisassociateCustomerGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateCustomerGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateCustomerGatewayResult call() throws Exception {
DisassociateCustomerGatewayResult result = null;
try {
result = executeDisassociateCustomerGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future disassociateLinkAsync(DisassociateLinkRequest request) {
return disassociateLinkAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateLinkAsync(final DisassociateLinkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateLinkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateLinkResult call() throws Exception {
DisassociateLinkResult result = null;
try {
result = executeDisassociateLink(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future disassociateTransitGatewayConnectPeerAsync(
DisassociateTransitGatewayConnectPeerRequest request) {
return disassociateTransitGatewayConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateTransitGatewayConnectPeerAsync(
final DisassociateTransitGatewayConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateTransitGatewayConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateTransitGatewayConnectPeerResult call() throws Exception {
DisassociateTransitGatewayConnectPeerResult result = null;
try {
result = executeDisassociateTransitGatewayConnectPeer(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future executeCoreNetworkChangeSetAsync(ExecuteCoreNetworkChangeSetRequest request) {
return executeCoreNetworkChangeSetAsync(request, null);
}
@Override
public java.util.concurrent.Future executeCoreNetworkChangeSetAsync(final ExecuteCoreNetworkChangeSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ExecuteCoreNetworkChangeSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ExecuteCoreNetworkChangeSetResult call() throws Exception {
ExecuteCoreNetworkChangeSetResult result = null;
try {
result = executeExecuteCoreNetworkChangeSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getConnectAttachmentAsync(GetConnectAttachmentRequest request) {
return getConnectAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future getConnectAttachmentAsync(final GetConnectAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConnectAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConnectAttachmentResult call() throws Exception {
GetConnectAttachmentResult result = null;
try {
result = executeGetConnectAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getConnectPeerAsync(GetConnectPeerRequest request) {
return getConnectPeerAsync(request, null);
}
@Override
public java.util.concurrent.Future getConnectPeerAsync(final GetConnectPeerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConnectPeerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConnectPeerResult call() throws Exception {
GetConnectPeerResult result = null;
try {
result = executeGetConnectPeer(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getConnectPeerAssociationsAsync(GetConnectPeerAssociationsRequest request) {
return getConnectPeerAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getConnectPeerAssociationsAsync(final GetConnectPeerAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConnectPeerAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConnectPeerAssociationsResult call() throws Exception {
GetConnectPeerAssociationsResult result = null;
try {
result = executeGetConnectPeerAssociations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getConnectionsAsync(GetConnectionsRequest request) {
return getConnectionsAsync(request, null);
}
@Override
public java.util.concurrent.Future getConnectionsAsync(final GetConnectionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConnectionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConnectionsResult call() throws Exception {
GetConnectionsResult result = null;
try {
result = executeGetConnections(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getCoreNetworkAsync(GetCoreNetworkRequest request) {
return getCoreNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future getCoreNetworkAsync(final GetCoreNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCoreNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCoreNetworkResult call() throws Exception {
GetCoreNetworkResult result = null;
try {
result = executeGetCoreNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getCoreNetworkChangeEventsAsync(GetCoreNetworkChangeEventsRequest request) {
return getCoreNetworkChangeEventsAsync(request, null);
}
@Override
public java.util.concurrent.Future getCoreNetworkChangeEventsAsync(final GetCoreNetworkChangeEventsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCoreNetworkChangeEventsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCoreNetworkChangeEventsResult call() throws Exception {
GetCoreNetworkChangeEventsResult result = null;
try {
result = executeGetCoreNetworkChangeEvents(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getCoreNetworkChangeSetAsync(GetCoreNetworkChangeSetRequest request) {
return getCoreNetworkChangeSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getCoreNetworkChangeSetAsync(final GetCoreNetworkChangeSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCoreNetworkChangeSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCoreNetworkChangeSetResult call() throws Exception {
GetCoreNetworkChangeSetResult result = null;
try {
result = executeGetCoreNetworkChangeSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getCoreNetworkPolicyAsync(GetCoreNetworkPolicyRequest request) {
return getCoreNetworkPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getCoreNetworkPolicyAsync(final GetCoreNetworkPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCoreNetworkPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCoreNetworkPolicyResult call() throws Exception {
GetCoreNetworkPolicyResult result = null;
try {
result = executeGetCoreNetworkPolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getCustomerGatewayAssociationsAsync(GetCustomerGatewayAssociationsRequest request) {
return getCustomerGatewayAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getCustomerGatewayAssociationsAsync(
final GetCustomerGatewayAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCustomerGatewayAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCustomerGatewayAssociationsResult call() throws Exception {
GetCustomerGatewayAssociationsResult result = null;
try {
result = executeGetCustomerGatewayAssociations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getDevicesAsync(GetDevicesRequest request) {
return getDevicesAsync(request, null);
}
@Override
public java.util.concurrent.Future getDevicesAsync(final GetDevicesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDevicesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDevicesResult call() throws Exception {
GetDevicesResult result = null;
try {
result = executeGetDevices(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getLinkAssociationsAsync(GetLinkAssociationsRequest request) {
return getLinkAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getLinkAssociationsAsync(final GetLinkAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetLinkAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetLinkAssociationsResult call() throws Exception {
GetLinkAssociationsResult result = null;
try {
result = executeGetLinkAssociations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getLinksAsync(GetLinksRequest request) {
return getLinksAsync(request, null);
}
@Override
public java.util.concurrent.Future getLinksAsync(final GetLinksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetLinksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetLinksResult call() throws Exception {
GetLinksResult result = null;
try {
result = executeGetLinks(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getNetworkResourceCountsAsync(GetNetworkResourceCountsRequest request) {
return getNetworkResourceCountsAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkResourceCountsAsync(final GetNetworkResourceCountsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkResourceCountsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkResourceCountsResult call() throws Exception {
GetNetworkResourceCountsResult result = null;
try {
result = executeGetNetworkResourceCounts(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getNetworkResourceRelationshipsAsync(
GetNetworkResourceRelationshipsRequest request) {
return getNetworkResourceRelationshipsAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkResourceRelationshipsAsync(
final GetNetworkResourceRelationshipsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkResourceRelationshipsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkResourceRelationshipsResult call() throws Exception {
GetNetworkResourceRelationshipsResult result = null;
try {
result = executeGetNetworkResourceRelationships(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getNetworkResourcesAsync(GetNetworkResourcesRequest request) {
return getNetworkResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkResourcesAsync(final GetNetworkResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkResourcesResult call() throws Exception {
GetNetworkResourcesResult result = null;
try {
result = executeGetNetworkResources(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getNetworkRoutesAsync(GetNetworkRoutesRequest request) {
return getNetworkRoutesAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkRoutesAsync(final GetNetworkRoutesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkRoutesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkRoutesResult call() throws Exception {
GetNetworkRoutesResult result = null;
try {
result = executeGetNetworkRoutes(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getNetworkTelemetryAsync(GetNetworkTelemetryRequest request) {
return getNetworkTelemetryAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkTelemetryAsync(final GetNetworkTelemetryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkTelemetryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkTelemetryResult call() throws Exception {
GetNetworkTelemetryResult result = null;
try {
result = executeGetNetworkTelemetry(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getResourcePolicyAsync(GetResourcePolicyRequest request) {
return getResourcePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getResourcePolicyAsync(final GetResourcePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetResourcePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetResourcePolicyResult call() throws Exception {
GetResourcePolicyResult result = null;
try {
result = executeGetResourcePolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getRouteAnalysisAsync(GetRouteAnalysisRequest request) {
return getRouteAnalysisAsync(request, null);
}
@Override
public java.util.concurrent.Future getRouteAnalysisAsync(final GetRouteAnalysisRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetRouteAnalysisRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetRouteAnalysisResult call() throws Exception {
GetRouteAnalysisResult result = null;
try {
result = executeGetRouteAnalysis(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getSiteToSiteVpnAttachmentAsync(GetSiteToSiteVpnAttachmentRequest request) {
return getSiteToSiteVpnAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future getSiteToSiteVpnAttachmentAsync(final GetSiteToSiteVpnAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSiteToSiteVpnAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSiteToSiteVpnAttachmentResult call() throws Exception {
GetSiteToSiteVpnAttachmentResult result = null;
try {
result = executeGetSiteToSiteVpnAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getSitesAsync(GetSitesRequest request) {
return getSitesAsync(request, null);
}
@Override
public java.util.concurrent.Future getSitesAsync(final GetSitesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSitesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSitesResult call() throws Exception {
GetSitesResult result = null;
try {
result = executeGetSites(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getTransitGatewayConnectPeerAssociationsAsync(
GetTransitGatewayConnectPeerAssociationsRequest request) {
return getTransitGatewayConnectPeerAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getTransitGatewayConnectPeerAssociationsAsync(
final GetTransitGatewayConnectPeerAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTransitGatewayConnectPeerAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTransitGatewayConnectPeerAssociationsResult call() throws Exception {
GetTransitGatewayConnectPeerAssociationsResult result = null;
try {
result = executeGetTransitGatewayConnectPeerAssociations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getTransitGatewayPeeringAsync(GetTransitGatewayPeeringRequest request) {
return getTransitGatewayPeeringAsync(request, null);
}
@Override
public java.util.concurrent.Future getTransitGatewayPeeringAsync(final GetTransitGatewayPeeringRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTransitGatewayPeeringRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTransitGatewayPeeringResult call() throws Exception {
GetTransitGatewayPeeringResult result = null;
try {
result = executeGetTransitGatewayPeering(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getTransitGatewayRegistrationsAsync(GetTransitGatewayRegistrationsRequest request) {
return getTransitGatewayRegistrationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getTransitGatewayRegistrationsAsync(
final GetTransitGatewayRegistrationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTransitGatewayRegistrationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTransitGatewayRegistrationsResult call() throws Exception {
GetTransitGatewayRegistrationsResult result = null;
try {
result = executeGetTransitGatewayRegistrations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getTransitGatewayRouteTableAttachmentAsync(
GetTransitGatewayRouteTableAttachmentRequest request) {
return getTransitGatewayRouteTableAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future getTransitGatewayRouteTableAttachmentAsync(
final GetTransitGatewayRouteTableAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTransitGatewayRouteTableAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTransitGatewayRouteTableAttachmentResult call() throws Exception {
GetTransitGatewayRouteTableAttachmentResult result = null;
try {
result = executeGetTransitGatewayRouteTableAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getVpcAttachmentAsync(GetVpcAttachmentRequest request) {
return getVpcAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future getVpcAttachmentAsync(final GetVpcAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetVpcAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetVpcAttachmentResult call() throws Exception {
GetVpcAttachmentResult result = null;
try {
result = executeGetVpcAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listAttachmentsAsync(ListAttachmentsRequest request) {
return listAttachmentsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAttachmentsAsync(final ListAttachmentsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAttachmentsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAttachmentsResult call() throws Exception {
ListAttachmentsResult result = null;
try {
result = executeListAttachments(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listConnectPeersAsync(ListConnectPeersRequest request) {
return listConnectPeersAsync(request, null);
}
@Override
public java.util.concurrent.Future listConnectPeersAsync(final ListConnectPeersRequest request,
final com.amazonaws.handlers.AsyncHandler