com.amazonaws.services.wafv2.AWSWAFV2AsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-wafv2 Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.wafv2;
import javax.annotation.Generated;
import com.amazonaws.services.wafv2.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing WAFV2 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.
*
* WAF
*
* This is the latest version of the WAF API, released in November, 2019. The names of the entities that you use
* to access this API, like endpoints and namespaces, all have the versioning information added, like "V2" or "v2", to
* distinguish from the prior version. We recommend migrating your resources to this version, because it has a number of
* significant improvements.
*
*
* If you used WAF prior to this release, you can't use this WAFV2 API to access any WAF resources that you created
* before. You can access your old rules, web ACLs, and other WAF resources only through the WAF Classic APIs. The WAF
* Classic APIs have retained the prior names, endpoints, and namespaces.
*
*
* For information, including how to migrate your WAF resources to this version, see the WAF Developer Guide.
*
*
*
* WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to an Amazon
* CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito
* user pool, App Runner service, or Amazon Web Services Verified Access instance. WAF also lets you control access to
* your content, to protect the Amazon Web Services resource that WAF is monitoring. Based on conditions that you
* specify, such as the IP addresses that requests originate from or the values of query strings, the protected resource
* responds to requests with either the requested content, an HTTP 403 status code (Forbidden), or with a custom
* response.
*
*
* This API guide is for developers who need detailed information about WAF API actions, data types, and errors. For
* detailed information about WAF features and guidance for configuring and using WAF, see the WAF Developer Guide.
*
*
* You can make calls using the endpoints listed in WAF
* endpoints and quotas.
*
*
* -
*
* For regional applications, you can use any of the endpoints in the list. A regional application can be an Application
* Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App
* Runner service, or an Amazon Web Services Verified Access instance.
*
*
* -
*
* For Amazon CloudFront applications, you must use the API endpoint listed for US East (N. Virginia): us-east-1.
*
*
*
*
* Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to the programming
* language or platform that you're using. For more information, see Amazon
* Web Services SDKs.
*
*
* We currently provide two versions of the WAF API: this API and the prior versions, the classic WAF APIs. This new API
* provides the same functionality as the older versions, with the following major improvements:
*
*
* -
*
* You use one API for both global and regional applications. Where you need to distinguish the scope, you specify a
* Scope
parameter and set it to CLOUDFRONT
or REGIONAL
.
*
*
* -
*
* You can define a web ACL or rule group with a single call, and update it with a single call. You define all rule
* specifications in JSON format, and pass them to your rule group or web ACL calls.
*
*
* -
*
* The limits WAF places on the use of rules more closely reflects the cost of running each type of rule. Rule groups
* include capacity settings, so you know the maximum cost of a rule group when you use it.
*
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSWAFV2AsyncClient extends AWSWAFV2Client implements AWSWAFV2Async {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSWAFV2AsyncClientBuilder asyncBuilder() {
return AWSWAFV2AsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on WAFV2 using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSWAFV2AsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on WAFV2 using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSWAFV2AsyncClient(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 associateWebACLAsync(AssociateWebACLRequest request) {
return associateWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future associateWebACLAsync(final AssociateWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateWebACLResult call() throws Exception {
AssociateWebACLResult result = null;
try {
result = executeAssociateWebACL(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 checkCapacityAsync(CheckCapacityRequest request) {
return checkCapacityAsync(request, null);
}
@Override
public java.util.concurrent.Future checkCapacityAsync(final CheckCapacityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CheckCapacityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CheckCapacityResult call() throws Exception {
CheckCapacityResult result = null;
try {
result = executeCheckCapacity(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 createAPIKeyAsync(CreateAPIKeyRequest request) {
return createAPIKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future createAPIKeyAsync(final CreateAPIKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAPIKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAPIKeyResult call() throws Exception {
CreateAPIKeyResult result = null;
try {
result = executeCreateAPIKey(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 createIPSetAsync(CreateIPSetRequest request) {
return createIPSetAsync(request, null);
}
@Override
public java.util.concurrent.Future createIPSetAsync(final CreateIPSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateIPSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateIPSetResult call() throws Exception {
CreateIPSetResult result = null;
try {
result = executeCreateIPSet(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 createRegexPatternSetAsync(CreateRegexPatternSetRequest request) {
return createRegexPatternSetAsync(request, null);
}
@Override
public java.util.concurrent.Future createRegexPatternSetAsync(final CreateRegexPatternSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateRegexPatternSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateRegexPatternSetResult call() throws Exception {
CreateRegexPatternSetResult result = null;
try {
result = executeCreateRegexPatternSet(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 createRuleGroupAsync(CreateRuleGroupRequest request) {
return createRuleGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future createRuleGroupAsync(final CreateRuleGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateRuleGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateRuleGroupResult call() throws Exception {
CreateRuleGroupResult result = null;
try {
result = executeCreateRuleGroup(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 createWebACLAsync(CreateWebACLRequest request) {
return createWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future createWebACLAsync(final CreateWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateWebACLResult call() throws Exception {
CreateWebACLResult result = null;
try {
result = executeCreateWebACL(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 deleteAPIKeyAsync(DeleteAPIKeyRequest request) {
return deleteAPIKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAPIKeyAsync(final DeleteAPIKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAPIKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAPIKeyResult call() throws Exception {
DeleteAPIKeyResult result = null;
try {
result = executeDeleteAPIKey(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 deleteFirewallManagerRuleGroupsAsync(
DeleteFirewallManagerRuleGroupsRequest request) {
return deleteFirewallManagerRuleGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteFirewallManagerRuleGroupsAsync(
final DeleteFirewallManagerRuleGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFirewallManagerRuleGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFirewallManagerRuleGroupsResult call() throws Exception {
DeleteFirewallManagerRuleGroupsResult result = null;
try {
result = executeDeleteFirewallManagerRuleGroups(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 deleteIPSetAsync(DeleteIPSetRequest request) {
return deleteIPSetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIPSetAsync(final DeleteIPSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIPSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIPSetResult call() throws Exception {
DeleteIPSetResult result = null;
try {
result = executeDeleteIPSet(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 deleteLoggingConfigurationAsync(DeleteLoggingConfigurationRequest request) {
return deleteLoggingConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLoggingConfigurationAsync(final DeleteLoggingConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLoggingConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLoggingConfigurationResult call() throws Exception {
DeleteLoggingConfigurationResult result = null;
try {
result = executeDeleteLoggingConfiguration(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 deletePermissionPolicyAsync(DeletePermissionPolicyRequest request) {
return deletePermissionPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePermissionPolicyAsync(final DeletePermissionPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePermissionPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePermissionPolicyResult call() throws Exception {
DeletePermissionPolicyResult result = null;
try {
result = executeDeletePermissionPolicy(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 deleteRegexPatternSetAsync(DeleteRegexPatternSetRequest request) {
return deleteRegexPatternSetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteRegexPatternSetAsync(final DeleteRegexPatternSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteRegexPatternSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteRegexPatternSetResult call() throws Exception {
DeleteRegexPatternSetResult result = null;
try {
result = executeDeleteRegexPatternSet(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 deleteRuleGroupAsync(DeleteRuleGroupRequest request) {
return deleteRuleGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteRuleGroupAsync(final DeleteRuleGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteRuleGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteRuleGroupResult call() throws Exception {
DeleteRuleGroupResult result = null;
try {
result = executeDeleteRuleGroup(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 deleteWebACLAsync(DeleteWebACLRequest request) {
return deleteWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteWebACLAsync(final DeleteWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteWebACLResult call() throws Exception {
DeleteWebACLResult result = null;
try {
result = executeDeleteWebACL(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 describeAllManagedProductsAsync(DescribeAllManagedProductsRequest request) {
return describeAllManagedProductsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAllManagedProductsAsync(final DescribeAllManagedProductsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAllManagedProductsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAllManagedProductsResult call() throws Exception {
DescribeAllManagedProductsResult result = null;
try {
result = executeDescribeAllManagedProducts(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 describeManagedProductsByVendorAsync(
DescribeManagedProductsByVendorRequest request) {
return describeManagedProductsByVendorAsync(request, null);
}
@Override
public java.util.concurrent.Future describeManagedProductsByVendorAsync(
final DescribeManagedProductsByVendorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeManagedProductsByVendorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeManagedProductsByVendorResult call() throws Exception {
DescribeManagedProductsByVendorResult result = null;
try {
result = executeDescribeManagedProductsByVendor(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 describeManagedRuleGroupAsync(DescribeManagedRuleGroupRequest request) {
return describeManagedRuleGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future describeManagedRuleGroupAsync(final DescribeManagedRuleGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeManagedRuleGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeManagedRuleGroupResult call() throws Exception {
DescribeManagedRuleGroupResult result = null;
try {
result = executeDescribeManagedRuleGroup(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 disassociateWebACLAsync(DisassociateWebACLRequest request) {
return disassociateWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateWebACLAsync(final DisassociateWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateWebACLResult call() throws Exception {
DisassociateWebACLResult result = null;
try {
result = executeDisassociateWebACL(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 generateMobileSdkReleaseUrlAsync(GenerateMobileSdkReleaseUrlRequest request) {
return generateMobileSdkReleaseUrlAsync(request, null);
}
@Override
public java.util.concurrent.Future generateMobileSdkReleaseUrlAsync(final GenerateMobileSdkReleaseUrlRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GenerateMobileSdkReleaseUrlRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GenerateMobileSdkReleaseUrlResult call() throws Exception {
GenerateMobileSdkReleaseUrlResult result = null;
try {
result = executeGenerateMobileSdkReleaseUrl(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 getDecryptedAPIKeyAsync(GetDecryptedAPIKeyRequest request) {
return getDecryptedAPIKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future getDecryptedAPIKeyAsync(final GetDecryptedAPIKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDecryptedAPIKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDecryptedAPIKeyResult call() throws Exception {
GetDecryptedAPIKeyResult result = null;
try {
result = executeGetDecryptedAPIKey(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 getIPSetAsync(GetIPSetRequest request) {
return getIPSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getIPSetAsync(final GetIPSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIPSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIPSetResult call() throws Exception {
GetIPSetResult result = null;
try {
result = executeGetIPSet(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 getLoggingConfigurationAsync(GetLoggingConfigurationRequest request) {
return getLoggingConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future getLoggingConfigurationAsync(final GetLoggingConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetLoggingConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetLoggingConfigurationResult call() throws Exception {
GetLoggingConfigurationResult result = null;
try {
result = executeGetLoggingConfiguration(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 getManagedRuleSetAsync(GetManagedRuleSetRequest request) {
return getManagedRuleSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getManagedRuleSetAsync(final GetManagedRuleSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetManagedRuleSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetManagedRuleSetResult call() throws Exception {
GetManagedRuleSetResult result = null;
try {
result = executeGetManagedRuleSet(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 getMobileSdkReleaseAsync(GetMobileSdkReleaseRequest request) {
return getMobileSdkReleaseAsync(request, null);
}
@Override
public java.util.concurrent.Future getMobileSdkReleaseAsync(final GetMobileSdkReleaseRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMobileSdkReleaseRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMobileSdkReleaseResult call() throws Exception {
GetMobileSdkReleaseResult result = null;
try {
result = executeGetMobileSdkRelease(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 getPermissionPolicyAsync(GetPermissionPolicyRequest request) {
return getPermissionPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getPermissionPolicyAsync(final GetPermissionPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetPermissionPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetPermissionPolicyResult call() throws Exception {
GetPermissionPolicyResult result = null;
try {
result = executeGetPermissionPolicy(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 getRateBasedStatementManagedKeysAsync(
GetRateBasedStatementManagedKeysRequest request) {
return getRateBasedStatementManagedKeysAsync(request, null);
}
@Override
public java.util.concurrent.Future getRateBasedStatementManagedKeysAsync(
final GetRateBasedStatementManagedKeysRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetRateBasedStatementManagedKeysRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetRateBasedStatementManagedKeysResult call() throws Exception {
GetRateBasedStatementManagedKeysResult result = null;
try {
result = executeGetRateBasedStatementManagedKeys(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 getRegexPatternSetAsync(GetRegexPatternSetRequest request) {
return getRegexPatternSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getRegexPatternSetAsync(final GetRegexPatternSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetRegexPatternSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetRegexPatternSetResult call() throws Exception {
GetRegexPatternSetResult result = null;
try {
result = executeGetRegexPatternSet(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 getRuleGroupAsync(GetRuleGroupRequest request) {
return getRuleGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future getRuleGroupAsync(final GetRuleGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetRuleGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetRuleGroupResult call() throws Exception {
GetRuleGroupResult result = null;
try {
result = executeGetRuleGroup(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 getSampledRequestsAsync(GetSampledRequestsRequest request) {
return getSampledRequestsAsync(request, null);
}
@Override
public java.util.concurrent.Future getSampledRequestsAsync(final GetSampledRequestsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSampledRequestsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSampledRequestsResult call() throws Exception {
GetSampledRequestsResult result = null;
try {
result = executeGetSampledRequests(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 getWebACLAsync(GetWebACLRequest request) {
return getWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future getWebACLAsync(final GetWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetWebACLResult call() throws Exception {
GetWebACLResult result = null;
try {
result = executeGetWebACL(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 getWebACLForResourceAsync(GetWebACLForResourceRequest request) {
return getWebACLForResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future getWebACLForResourceAsync(final GetWebACLForResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetWebACLForResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetWebACLForResourceResult call() throws Exception {
GetWebACLForResourceResult result = null;
try {
result = executeGetWebACLForResource(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 listAPIKeysAsync(ListAPIKeysRequest request) {
return listAPIKeysAsync(request, null);
}
@Override
public java.util.concurrent.Future listAPIKeysAsync(final ListAPIKeysRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAPIKeysRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAPIKeysResult call() throws Exception {
ListAPIKeysResult result = null;
try {
result = executeListAPIKeys(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 listAvailableManagedRuleGroupVersionsAsync(
ListAvailableManagedRuleGroupVersionsRequest request) {
return listAvailableManagedRuleGroupVersionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAvailableManagedRuleGroupVersionsAsync(
final ListAvailableManagedRuleGroupVersionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAvailableManagedRuleGroupVersionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAvailableManagedRuleGroupVersionsResult call() throws Exception {
ListAvailableManagedRuleGroupVersionsResult result = null;
try {
result = executeListAvailableManagedRuleGroupVersions(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 listAvailableManagedRuleGroupsAsync(ListAvailableManagedRuleGroupsRequest request) {
return listAvailableManagedRuleGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAvailableManagedRuleGroupsAsync(
final ListAvailableManagedRuleGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAvailableManagedRuleGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAvailableManagedRuleGroupsResult call() throws Exception {
ListAvailableManagedRuleGroupsResult result = null;
try {
result = executeListAvailableManagedRuleGroups(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 listIPSetsAsync(ListIPSetsRequest request) {
return listIPSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listIPSetsAsync(final ListIPSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIPSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIPSetsResult call() throws Exception {
ListIPSetsResult result = null;
try {
result = executeListIPSets(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 listLoggingConfigurationsAsync(ListLoggingConfigurationsRequest request) {
return listLoggingConfigurationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listLoggingConfigurationsAsync(final ListLoggingConfigurationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListLoggingConfigurationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListLoggingConfigurationsResult call() throws Exception {
ListLoggingConfigurationsResult result = null;
try {
result = executeListLoggingConfigurations(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 listManagedRuleSetsAsync(ListManagedRuleSetsRequest request) {
return listManagedRuleSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listManagedRuleSetsAsync(final ListManagedRuleSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListManagedRuleSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListManagedRuleSetsResult call() throws Exception {
ListManagedRuleSetsResult result = null;
try {
result = executeListManagedRuleSets(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 listMobileSdkReleasesAsync(ListMobileSdkReleasesRequest request) {
return listMobileSdkReleasesAsync(request, null);
}
@Override
public java.util.concurrent.Future listMobileSdkReleasesAsync(final ListMobileSdkReleasesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMobileSdkReleasesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMobileSdkReleasesResult call() throws Exception {
ListMobileSdkReleasesResult result = null;
try {
result = executeListMobileSdkReleases(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 listRegexPatternSetsAsync(ListRegexPatternSetsRequest request) {
return listRegexPatternSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listRegexPatternSetsAsync(final ListRegexPatternSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListRegexPatternSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListRegexPatternSetsResult call() throws Exception {
ListRegexPatternSetsResult result = null;
try {
result = executeListRegexPatternSets(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 listResourcesForWebACLAsync(ListResourcesForWebACLRequest request) {
return listResourcesForWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future listResourcesForWebACLAsync(final ListResourcesForWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListResourcesForWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListResourcesForWebACLResult call() throws Exception {
ListResourcesForWebACLResult result = null;
try {
result = executeListResourcesForWebACL(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 listRuleGroupsAsync(ListRuleGroupsRequest request) {
return listRuleGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listRuleGroupsAsync(final ListRuleGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListRuleGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListRuleGroupsResult call() throws Exception {
ListRuleGroupsResult result = null;
try {
result = executeListRuleGroups(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 listWebACLsAsync(ListWebACLsRequest request) {
return listWebACLsAsync(request, null);
}
@Override
public java.util.concurrent.Future listWebACLsAsync(final ListWebACLsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListWebACLsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListWebACLsResult call() throws Exception {
ListWebACLsResult result = null;
try {
result = executeListWebACLs(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 putLoggingConfigurationAsync(PutLoggingConfigurationRequest request) {
return putLoggingConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future putLoggingConfigurationAsync(final PutLoggingConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutLoggingConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutLoggingConfigurationResult call() throws Exception {
PutLoggingConfigurationResult result = null;
try {
result = executePutLoggingConfiguration(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 putManagedRuleSetVersionsAsync(PutManagedRuleSetVersionsRequest request) {
return putManagedRuleSetVersionsAsync(request, null);
}
@Override
public java.util.concurrent.Future putManagedRuleSetVersionsAsync(final PutManagedRuleSetVersionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutManagedRuleSetVersionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutManagedRuleSetVersionsResult call() throws Exception {
PutManagedRuleSetVersionsResult result = null;
try {
result = executePutManagedRuleSetVersions(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 putPermissionPolicyAsync(PutPermissionPolicyRequest request) {
return putPermissionPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future putPermissionPolicyAsync(final PutPermissionPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutPermissionPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutPermissionPolicyResult call() throws Exception {
PutPermissionPolicyResult result = null;
try {
result = executePutPermissionPolicy(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) {
return tagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TagResourceResult call() throws Exception {
TagResourceResult result = null;
try {
result = executeTagResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) {
return untagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UntagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UntagResourceResult call() throws Exception {
UntagResourceResult result = null;
try {
result = executeUntagResource(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future updateIPSetAsync(UpdateIPSetRequest request) {
return updateIPSetAsync(request, null);
}
@Override
public java.util.concurrent.Future updateIPSetAsync(final UpdateIPSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateIPSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateIPSetResult call() throws Exception {
UpdateIPSetResult result = null;
try {
result = executeUpdateIPSet(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 updateManagedRuleSetVersionExpiryDateAsync(
UpdateManagedRuleSetVersionExpiryDateRequest request) {
return updateManagedRuleSetVersionExpiryDateAsync(request, null);
}
@Override
public java.util.concurrent.Future updateManagedRuleSetVersionExpiryDateAsync(
final UpdateManagedRuleSetVersionExpiryDateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateManagedRuleSetVersionExpiryDateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateManagedRuleSetVersionExpiryDateResult call() throws Exception {
UpdateManagedRuleSetVersionExpiryDateResult result = null;
try {
result = executeUpdateManagedRuleSetVersionExpiryDate(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 updateRegexPatternSetAsync(UpdateRegexPatternSetRequest request) {
return updateRegexPatternSetAsync(request, null);
}
@Override
public java.util.concurrent.Future updateRegexPatternSetAsync(final UpdateRegexPatternSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateRegexPatternSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateRegexPatternSetResult call() throws Exception {
UpdateRegexPatternSetResult result = null;
try {
result = executeUpdateRegexPatternSet(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 updateRuleGroupAsync(UpdateRuleGroupRequest request) {
return updateRuleGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future updateRuleGroupAsync(final UpdateRuleGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateRuleGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateRuleGroupResult call() throws Exception {
UpdateRuleGroupResult result = null;
try {
result = executeUpdateRuleGroup(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 updateWebACLAsync(UpdateWebACLRequest request) {
return updateWebACLAsync(request, null);
}
@Override
public java.util.concurrent.Future updateWebACLAsync(final UpdateWebACLRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateWebACLRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateWebACLResult call() throws Exception {
UpdateWebACLResult result = null;
try {
result = executeUpdateWebACL(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();
}
}