com.amazonaws.services.fms.AWSFMSAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-fms Show documentation
Show all versions of aws-java-sdk-fms Show documentation
The AWS Java SDK for Firewall Management module holds the client classes that are used for communicating with Firewall Management Service
/*
* 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.fms;
import javax.annotation.Generated;
import com.amazonaws.services.fms.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing FMS 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.
*
*
* This is the Firewall Manager API Reference. This guide is for developers who need detailed information about
* the Firewall Manager API actions, data types, and errors. For detailed information about Firewall Manager features,
* see the Firewall Manager Developer
* Guide.
*
*
* Some API actions require explicit resource permissions. For information, see the developer guide topic Service roles for Firewall Manager.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSFMSAsyncClient extends AWSFMSClient implements AWSFMSAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSFMSAsyncClientBuilder asyncBuilder() {
return AWSFMSAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on FMS using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSFMSAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on FMS using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSFMSAsyncClient(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 associateAdminAccountAsync(AssociateAdminAccountRequest request) {
return associateAdminAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future associateAdminAccountAsync(final AssociateAdminAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateAdminAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateAdminAccountResult call() throws Exception {
AssociateAdminAccountResult result = null;
try {
result = executeAssociateAdminAccount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateThirdPartyFirewallAsync(AssociateThirdPartyFirewallRequest request) {
return associateThirdPartyFirewallAsync(request, null);
}
@Override
public java.util.concurrent.Future associateThirdPartyFirewallAsync(final AssociateThirdPartyFirewallRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateThirdPartyFirewallRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateThirdPartyFirewallResult call() throws Exception {
AssociateThirdPartyFirewallResult result = null;
try {
result = executeAssociateThirdPartyFirewall(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future batchAssociateResourceAsync(BatchAssociateResourceRequest request) {
return batchAssociateResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future batchAssociateResourceAsync(final BatchAssociateResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchAssociateResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchAssociateResourceResult call() throws Exception {
BatchAssociateResourceResult result = null;
try {
result = executeBatchAssociateResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future batchDisassociateResourceAsync(BatchDisassociateResourceRequest request) {
return batchDisassociateResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDisassociateResourceAsync(final BatchDisassociateResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDisassociateResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDisassociateResourceResult call() throws Exception {
BatchDisassociateResourceResult result = null;
try {
result = executeBatchDisassociateResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteAppsListAsync(DeleteAppsListRequest request) {
return deleteAppsListAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAppsListAsync(final DeleteAppsListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAppsListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAppsListResult call() throws Exception {
DeleteAppsListResult result = null;
try {
result = executeDeleteAppsList(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteNotificationChannelAsync(DeleteNotificationChannelRequest request) {
return deleteNotificationChannelAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteNotificationChannelAsync(final DeleteNotificationChannelRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteNotificationChannelRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteNotificationChannelResult call() throws Exception {
DeleteNotificationChannelResult result = null;
try {
result = executeDeleteNotificationChannel(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deletePolicyAsync(DeletePolicyRequest request) {
return deletePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePolicyAsync(final DeletePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePolicyResult call() throws Exception {
DeletePolicyResult result = null;
try {
result = executeDeletePolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteProtocolsListAsync(DeleteProtocolsListRequest request) {
return deleteProtocolsListAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteProtocolsListAsync(final DeleteProtocolsListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteProtocolsListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteProtocolsListResult call() throws Exception {
DeleteProtocolsListResult result = null;
try {
result = executeDeleteProtocolsList(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future deleteResourceSetAsync(DeleteResourceSetRequest request) {
return deleteResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteResourceSetAsync(final DeleteResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteResourceSetResult call() throws Exception {
DeleteResourceSetResult result = null;
try {
result = executeDeleteResourceSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future disassociateAdminAccountAsync(DisassociateAdminAccountRequest request) {
return disassociateAdminAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateAdminAccountAsync(final DisassociateAdminAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateAdminAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateAdminAccountResult call() throws Exception {
DisassociateAdminAccountResult result = null;
try {
result = executeDisassociateAdminAccount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future disassociateThirdPartyFirewallAsync(DisassociateThirdPartyFirewallRequest request) {
return disassociateThirdPartyFirewallAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateThirdPartyFirewallAsync(
final DisassociateThirdPartyFirewallRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateThirdPartyFirewallRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateThirdPartyFirewallResult call() throws Exception {
DisassociateThirdPartyFirewallResult result = null;
try {
result = executeDisassociateThirdPartyFirewall(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getAdminAccountAsync(GetAdminAccountRequest request) {
return getAdminAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future getAdminAccountAsync(final GetAdminAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAdminAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAdminAccountResult call() throws Exception {
GetAdminAccountResult result = null;
try {
result = executeGetAdminAccount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getAdminScopeAsync(GetAdminScopeRequest request) {
return getAdminScopeAsync(request, null);
}
@Override
public java.util.concurrent.Future getAdminScopeAsync(final GetAdminScopeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAdminScopeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAdminScopeResult call() throws Exception {
GetAdminScopeResult result = null;
try {
result = executeGetAdminScope(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getAppsListAsync(GetAppsListRequest request) {
return getAppsListAsync(request, null);
}
@Override
public java.util.concurrent.Future getAppsListAsync(final GetAppsListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAppsListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAppsListResult call() throws Exception {
GetAppsListResult result = null;
try {
result = executeGetAppsList(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getComplianceDetailAsync(GetComplianceDetailRequest request) {
return getComplianceDetailAsync(request, null);
}
@Override
public java.util.concurrent.Future getComplianceDetailAsync(final GetComplianceDetailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetComplianceDetailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetComplianceDetailResult call() throws Exception {
GetComplianceDetailResult result = null;
try {
result = executeGetComplianceDetail(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getNotificationChannelAsync(GetNotificationChannelRequest request) {
return getNotificationChannelAsync(request, null);
}
@Override
public java.util.concurrent.Future getNotificationChannelAsync(final GetNotificationChannelRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNotificationChannelRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNotificationChannelResult call() throws Exception {
GetNotificationChannelResult result = null;
try {
result = executeGetNotificationChannel(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getPolicyAsync(GetPolicyRequest request) {
return getPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getPolicyAsync(final GetPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetPolicyResult call() throws Exception {
GetPolicyResult result = null;
try {
result = executeGetPolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getProtectionStatusAsync(GetProtectionStatusRequest request) {
return getProtectionStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getProtectionStatusAsync(final GetProtectionStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetProtectionStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetProtectionStatusResult call() throws Exception {
GetProtectionStatusResult result = null;
try {
result = executeGetProtectionStatus(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getProtocolsListAsync(GetProtocolsListRequest request) {
return getProtocolsListAsync(request, null);
}
@Override
public java.util.concurrent.Future getProtocolsListAsync(final GetProtocolsListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetProtocolsListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetProtocolsListResult call() throws Exception {
GetProtocolsListResult result = null;
try {
result = executeGetProtocolsList(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getResourceSetAsync(GetResourceSetRequest request) {
return getResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getResourceSetAsync(final GetResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetResourceSetResult call() throws Exception {
GetResourceSetResult result = null;
try {
result = executeGetResourceSet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getThirdPartyFirewallAssociationStatusAsync(
GetThirdPartyFirewallAssociationStatusRequest request) {
return getThirdPartyFirewallAssociationStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getThirdPartyFirewallAssociationStatusAsync(
final GetThirdPartyFirewallAssociationStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetThirdPartyFirewallAssociationStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetThirdPartyFirewallAssociationStatusResult call() throws Exception {
GetThirdPartyFirewallAssociationStatusResult result = null;
try {
result = executeGetThirdPartyFirewallAssociationStatus(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future getViolationDetailsAsync(GetViolationDetailsRequest request) {
return getViolationDetailsAsync(request, null);
}
@Override
public java.util.concurrent.Future getViolationDetailsAsync(final GetViolationDetailsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetViolationDetailsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetViolationDetailsResult call() throws Exception {
GetViolationDetailsResult result = null;
try {
result = executeGetViolationDetails(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listAdminAccountsForOrganizationAsync(
ListAdminAccountsForOrganizationRequest request) {
return listAdminAccountsForOrganizationAsync(request, null);
}
@Override
public java.util.concurrent.Future listAdminAccountsForOrganizationAsync(
final ListAdminAccountsForOrganizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAdminAccountsForOrganizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAdminAccountsForOrganizationResult call() throws Exception {
ListAdminAccountsForOrganizationResult result = null;
try {
result = executeListAdminAccountsForOrganization(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listAdminsManagingAccountAsync(ListAdminsManagingAccountRequest request) {
return listAdminsManagingAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future listAdminsManagingAccountAsync(final ListAdminsManagingAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAdminsManagingAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAdminsManagingAccountResult call() throws Exception {
ListAdminsManagingAccountResult result = null;
try {
result = executeListAdminsManagingAccount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listAppsListsAsync(ListAppsListsRequest request) {
return listAppsListsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAppsListsAsync(final ListAppsListsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAppsListsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAppsListsResult call() throws Exception {
ListAppsListsResult result = null;
try {
result = executeListAppsLists(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listComplianceStatusAsync(ListComplianceStatusRequest request) {
return listComplianceStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future listComplianceStatusAsync(final ListComplianceStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListComplianceStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListComplianceStatusResult call() throws Exception {
ListComplianceStatusResult result = null;
try {
result = executeListComplianceStatus(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listDiscoveredResourcesAsync(ListDiscoveredResourcesRequest request) {
return listDiscoveredResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future listDiscoveredResourcesAsync(final ListDiscoveredResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDiscoveredResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDiscoveredResourcesResult call() throws Exception {
ListDiscoveredResourcesResult result = null;
try {
result = executeListDiscoveredResources(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listMemberAccountsAsync(ListMemberAccountsRequest request) {
return listMemberAccountsAsync(request, null);
}
@Override
public java.util.concurrent.Future listMemberAccountsAsync(final ListMemberAccountsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMemberAccountsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMemberAccountsResult call() throws Exception {
ListMemberAccountsResult result = null;
try {
result = executeListMemberAccounts(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listPoliciesAsync(ListPoliciesRequest request) {
return listPoliciesAsync(request, null);
}
@Override
public java.util.concurrent.Future listPoliciesAsync(final ListPoliciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPoliciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPoliciesResult call() throws Exception {
ListPoliciesResult result = null;
try {
result = executeListPolicies(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listProtocolsListsAsync(ListProtocolsListsRequest request) {
return listProtocolsListsAsync(request, null);
}
@Override
public java.util.concurrent.Future listProtocolsListsAsync(final ListProtocolsListsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListProtocolsListsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListProtocolsListsResult call() throws Exception {
ListProtocolsListsResult result = null;
try {
result = executeListProtocolsLists(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listResourceSetResourcesAsync(ListResourceSetResourcesRequest request) {
return listResourceSetResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future listResourceSetResourcesAsync(final ListResourceSetResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListResourceSetResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListResourceSetResourcesResult call() throws Exception {
ListResourceSetResourcesResult result = null;
try {
result = executeListResourceSetResources(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listResourceSetsAsync(ListResourceSetsRequest request) {
return listResourceSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listResourceSetsAsync(final ListResourceSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListResourceSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListResourceSetsResult call() throws Exception {
ListResourceSetsResult result = null;
try {
result = executeListResourceSets(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) {
return listTagsForResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTagsForResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTagsForResourceResult call() throws Exception {
ListTagsForResourceResult result = null;
try {
result = executeListTagsForResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future listThirdPartyFirewallFirewallPoliciesAsync(
ListThirdPartyFirewallFirewallPoliciesRequest request) {
return listThirdPartyFirewallFirewallPoliciesAsync(request, null);
}
@Override
public java.util.concurrent.Future listThirdPartyFirewallFirewallPoliciesAsync(
final ListThirdPartyFirewallFirewallPoliciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListThirdPartyFirewallFirewallPoliciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListThirdPartyFirewallFirewallPoliciesResult call() throws Exception {
ListThirdPartyFirewallFirewallPoliciesResult result = null;
try {
result = executeListThirdPartyFirewallFirewallPolicies(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future putAdminAccountAsync(PutAdminAccountRequest request) {
return putAdminAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future putAdminAccountAsync(final PutAdminAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutAdminAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutAdminAccountResult call() throws Exception {
PutAdminAccountResult result = null;
try {
result = executePutAdminAccount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future putAppsListAsync(PutAppsListRequest request) {
return putAppsListAsync(request, null);
}
@Override
public java.util.concurrent.Future putAppsListAsync(final PutAppsListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutAppsListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutAppsListResult call() throws Exception {
PutAppsListResult result = null;
try {
result = executePutAppsList(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future putNotificationChannelAsync(PutNotificationChannelRequest request) {
return putNotificationChannelAsync(request, null);
}
@Override
public java.util.concurrent.Future putNotificationChannelAsync(final PutNotificationChannelRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutNotificationChannelRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutNotificationChannelResult call() throws Exception {
PutNotificationChannelResult result = null;
try {
result = executePutNotificationChannel(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future putPolicyAsync(PutPolicyRequest request) {
return putPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future putPolicyAsync(final PutPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutPolicyResult call() throws Exception {
PutPolicyResult result = null;
try {
result = executePutPolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future putProtocolsListAsync(PutProtocolsListRequest request) {
return putProtocolsListAsync(request, null);
}
@Override
public java.util.concurrent.Future putProtocolsListAsync(final PutProtocolsListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutProtocolsListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutProtocolsListResult call() throws Exception {
PutProtocolsListResult result = null;
try {
result = executePutProtocolsList(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future putResourceSetAsync(PutResourceSetRequest request) {
return putResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future putResourceSetAsync(final PutResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutResourceSetResult call() throws Exception {
PutResourceSetResult result = null;
try {
result = executePutResourceSet(finalRequest);
} catch (Exception 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;
}
});
}
/**
* Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending
* asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should
* call {@code getExecutorService().shutdown()} followed by {@code getExecutorService().awaitTermination()} prior to
* calling this method.
*/
@Override
public void shutdown() {
super.shutdown();
executorService.shutdownNow();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy