All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.networkfirewall.AWSNetworkFirewallAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Network Firewall module holds the client classes that are used for communicating with AWS Network Firewall Service

There is a newer version: 1.12.780
Show 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.networkfirewall;

import javax.annotation.Generated;

import com.amazonaws.services.networkfirewall.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Network Firewall 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 API Reference for Network Firewall. This guide is for developers who need detailed information about the * Network Firewall API actions, data types, and errors. *

*
    *
  • *

    * The REST API requires you to handle connection details, such as calculating signatures, handling request retries, and * error handling. For general information about using the Amazon Web Services REST APIs, see Amazon Web Services APIs. *

    *

    * To access Network Firewall using the REST API endpoint: * https://network-firewall.<region>.amazonaws.com *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * For descriptions of Network Firewall features, including and step-by-step instructions on how to use them through the * Network Firewall console, see the Network Firewall Developer Guide. *

    *
  • *
*

* Network Firewall is a stateful, managed, network firewall and intrusion detection and prevention service for Amazon * Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the perimeter of your VPC. This * includes filtering traffic going to and coming from an internet gateway, NAT gateway, or over VPN or Direct Connect. * Network Firewall uses rules that are compatible with Suricata, a free, open source network analysis and threat * detection engine. Network Firewall supports Suricata version 6.0.9. For information about Suricata, see the Suricata website. *

*

* You can use Network Firewall to monitor and protect your VPC traffic in a number of ways. The following are just a * few examples: *

*
    *
  • *

    * Allow domains or IP addresses for known Amazon Web Services service endpoints, such as Amazon S3, and block all other * forms of traffic. *

    *
  • *
  • *

    * Use custom lists of known bad domains to limit the types of domain names that your applications can access. *

    *
  • *
  • *

    * Perform deep packet inspection on traffic entering or leaving your VPC. *

    *
  • *
  • *

    * Use stateful protocol detection to filter protocols like HTTPS, regardless of the port used. *

    *
  • *
*

* To enable Network Firewall for your VPCs, you perform steps in both Amazon VPC and in Network Firewall. For * information about using Amazon VPC, see Amazon VPC User * Guide. *

*

* To start using Network Firewall, do the following: *

*
    *
  1. *

    * (Optional) If you don't already have a VPC that you want to protect, create it in Amazon VPC. *

    *
  2. *
  3. *

    * In Amazon VPC, in each Availability Zone where you want to have a firewall endpoint, create a subnet for the sole use * of Network Firewall. *

    *
  4. *
  5. *

    * In Network Firewall, create stateless and stateful rule groups, to define the components of the network traffic * filtering behavior that you want your firewall to have. *

    *
  6. *
  7. *

    * In Network Firewall, create a firewall policy that uses your rule groups and specifies additional default traffic * filtering behavior. *

    *
  8. *
  9. *

    * In Network Firewall, create a firewall and specify your new firewall policy and VPC subnets. Network Firewall creates * a firewall endpoint in each subnet that you specify, with the behavior that's defined in the firewall policy. *

    *
  10. *
  11. *

    * In Amazon VPC, use ingress routing enhancements to route traffic through the new firewall endpoints. *

    *
  12. *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSNetworkFirewallAsyncClient extends AWSNetworkFirewallClient implements AWSNetworkFirewallAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSNetworkFirewallAsyncClientBuilder asyncBuilder() { return AWSNetworkFirewallAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Network Firewall using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSNetworkFirewallAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Network Firewall using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSNetworkFirewallAsyncClient(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 associateFirewallPolicyAsync(AssociateFirewallPolicyRequest request) { return associateFirewallPolicyAsync(request, null); } @Override public java.util.concurrent.Future associateFirewallPolicyAsync(final AssociateFirewallPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateFirewallPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateFirewallPolicyResult call() throws Exception { AssociateFirewallPolicyResult result = null; try { result = executeAssociateFirewallPolicy(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 associateSubnetsAsync(AssociateSubnetsRequest request) { return associateSubnetsAsync(request, null); } @Override public java.util.concurrent.Future associateSubnetsAsync(final AssociateSubnetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateSubnetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateSubnetsResult call() throws Exception { AssociateSubnetsResult result = null; try { result = executeAssociateSubnets(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 createFirewallAsync(CreateFirewallRequest request) { return createFirewallAsync(request, null); } @Override public java.util.concurrent.Future createFirewallAsync(final CreateFirewallRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFirewallRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFirewallResult call() throws Exception { CreateFirewallResult result = null; try { result = executeCreateFirewall(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 createFirewallPolicyAsync(CreateFirewallPolicyRequest request) { return createFirewallPolicyAsync(request, null); } @Override public java.util.concurrent.Future createFirewallPolicyAsync(final CreateFirewallPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFirewallPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFirewallPolicyResult call() throws Exception { CreateFirewallPolicyResult result = null; try { result = executeCreateFirewallPolicy(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 createTLSInspectionConfigurationAsync( CreateTLSInspectionConfigurationRequest request) { return createTLSInspectionConfigurationAsync(request, null); } @Override public java.util.concurrent.Future createTLSInspectionConfigurationAsync( final CreateTLSInspectionConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTLSInspectionConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTLSInspectionConfigurationResult call() throws Exception { CreateTLSInspectionConfigurationResult result = null; try { result = executeCreateTLSInspectionConfiguration(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 deleteFirewallAsync(DeleteFirewallRequest request) { return deleteFirewallAsync(request, null); } @Override public java.util.concurrent.Future deleteFirewallAsync(final DeleteFirewallRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFirewallRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFirewallResult call() throws Exception { DeleteFirewallResult result = null; try { result = executeDeleteFirewall(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 deleteFirewallPolicyAsync(DeleteFirewallPolicyRequest request) { return deleteFirewallPolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteFirewallPolicyAsync(final DeleteFirewallPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFirewallPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFirewallPolicyResult call() throws Exception { DeleteFirewallPolicyResult result = null; try { result = executeDeleteFirewallPolicy(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 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 deleteTLSInspectionConfigurationAsync( DeleteTLSInspectionConfigurationRequest request) { return deleteTLSInspectionConfigurationAsync(request, null); } @Override public java.util.concurrent.Future deleteTLSInspectionConfigurationAsync( final DeleteTLSInspectionConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTLSInspectionConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTLSInspectionConfigurationResult call() throws Exception { DeleteTLSInspectionConfigurationResult result = null; try { result = executeDeleteTLSInspectionConfiguration(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 describeFirewallAsync(DescribeFirewallRequest request) { return describeFirewallAsync(request, null); } @Override public java.util.concurrent.Future describeFirewallAsync(final DescribeFirewallRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFirewallRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFirewallResult call() throws Exception { DescribeFirewallResult result = null; try { result = executeDescribeFirewall(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 describeFirewallPolicyAsync(DescribeFirewallPolicyRequest request) { return describeFirewallPolicyAsync(request, null); } @Override public java.util.concurrent.Future describeFirewallPolicyAsync(final DescribeFirewallPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFirewallPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFirewallPolicyResult call() throws Exception { DescribeFirewallPolicyResult result = null; try { result = executeDescribeFirewallPolicy(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 describeLoggingConfigurationAsync(DescribeLoggingConfigurationRequest request) { return describeLoggingConfigurationAsync(request, null); } @Override public java.util.concurrent.Future describeLoggingConfigurationAsync(final DescribeLoggingConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLoggingConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLoggingConfigurationResult call() throws Exception { DescribeLoggingConfigurationResult result = null; try { result = executeDescribeLoggingConfiguration(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 describeResourcePolicyAsync(DescribeResourcePolicyRequest request) { return describeResourcePolicyAsync(request, null); } @Override public java.util.concurrent.Future describeResourcePolicyAsync(final DescribeResourcePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeResourcePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeResourcePolicyResult call() throws Exception { DescribeResourcePolicyResult result = null; try { result = executeDescribeResourcePolicy(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 describeRuleGroupAsync(DescribeRuleGroupRequest request) { return describeRuleGroupAsync(request, null); } @Override public java.util.concurrent.Future describeRuleGroupAsync(final DescribeRuleGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRuleGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRuleGroupResult call() throws Exception { DescribeRuleGroupResult result = null; try { result = executeDescribeRuleGroup(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 describeRuleGroupMetadataAsync(DescribeRuleGroupMetadataRequest request) { return describeRuleGroupMetadataAsync(request, null); } @Override public java.util.concurrent.Future describeRuleGroupMetadataAsync(final DescribeRuleGroupMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRuleGroupMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRuleGroupMetadataResult call() throws Exception { DescribeRuleGroupMetadataResult result = null; try { result = executeDescribeRuleGroupMetadata(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 describeTLSInspectionConfigurationAsync( DescribeTLSInspectionConfigurationRequest request) { return describeTLSInspectionConfigurationAsync(request, null); } @Override public java.util.concurrent.Future describeTLSInspectionConfigurationAsync( final DescribeTLSInspectionConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTLSInspectionConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTLSInspectionConfigurationResult call() throws Exception { DescribeTLSInspectionConfigurationResult result = null; try { result = executeDescribeTLSInspectionConfiguration(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 disassociateSubnetsAsync(DisassociateSubnetsRequest request) { return disassociateSubnetsAsync(request, null); } @Override public java.util.concurrent.Future disassociateSubnetsAsync(final DisassociateSubnetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateSubnetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateSubnetsResult call() throws Exception { DisassociateSubnetsResult result = null; try { result = executeDisassociateSubnets(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 listFirewallPoliciesAsync(ListFirewallPoliciesRequest request) { return listFirewallPoliciesAsync(request, null); } @Override public java.util.concurrent.Future listFirewallPoliciesAsync(final ListFirewallPoliciesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFirewallPoliciesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFirewallPoliciesResult call() throws Exception { ListFirewallPoliciesResult result = null; try { result = executeListFirewallPolicies(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 listFirewallsAsync(ListFirewallsRequest request) { return listFirewallsAsync(request, null); } @Override public java.util.concurrent.Future listFirewallsAsync(final ListFirewallsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFirewallsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFirewallsResult call() throws Exception { ListFirewallsResult result = null; try { result = executeListFirewalls(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 listTLSInspectionConfigurationsAsync( ListTLSInspectionConfigurationsRequest request) { return listTLSInspectionConfigurationsAsync(request, null); } @Override public java.util.concurrent.Future listTLSInspectionConfigurationsAsync( final ListTLSInspectionConfigurationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTLSInspectionConfigurationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTLSInspectionConfigurationsResult call() throws Exception { ListTLSInspectionConfigurationsResult result = null; try { result = executeListTLSInspectionConfigurations(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 putResourcePolicyAsync(PutResourcePolicyRequest request) { return putResourcePolicyAsync(request, null); } @Override public java.util.concurrent.Future putResourcePolicyAsync(final PutResourcePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutResourcePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutResourcePolicyResult call() throws Exception { PutResourcePolicyResult result = null; try { result = executePutResourcePolicy(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 updateFirewallDeleteProtectionAsync(UpdateFirewallDeleteProtectionRequest request) { return updateFirewallDeleteProtectionAsync(request, null); } @Override public java.util.concurrent.Future updateFirewallDeleteProtectionAsync( final UpdateFirewallDeleteProtectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFirewallDeleteProtectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFirewallDeleteProtectionResult call() throws Exception { UpdateFirewallDeleteProtectionResult result = null; try { result = executeUpdateFirewallDeleteProtection(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 updateFirewallDescriptionAsync(UpdateFirewallDescriptionRequest request) { return updateFirewallDescriptionAsync(request, null); } @Override public java.util.concurrent.Future updateFirewallDescriptionAsync(final UpdateFirewallDescriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFirewallDescriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFirewallDescriptionResult call() throws Exception { UpdateFirewallDescriptionResult result = null; try { result = executeUpdateFirewallDescription(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 updateFirewallEncryptionConfigurationAsync( UpdateFirewallEncryptionConfigurationRequest request) { return updateFirewallEncryptionConfigurationAsync(request, null); } @Override public java.util.concurrent.Future updateFirewallEncryptionConfigurationAsync( final UpdateFirewallEncryptionConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFirewallEncryptionConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFirewallEncryptionConfigurationResult call() throws Exception { UpdateFirewallEncryptionConfigurationResult result = null; try { result = executeUpdateFirewallEncryptionConfiguration(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 updateFirewallPolicyAsync(UpdateFirewallPolicyRequest request) { return updateFirewallPolicyAsync(request, null); } @Override public java.util.concurrent.Future updateFirewallPolicyAsync(final UpdateFirewallPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFirewallPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFirewallPolicyResult call() throws Exception { UpdateFirewallPolicyResult result = null; try { result = executeUpdateFirewallPolicy(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 updateFirewallPolicyChangeProtectionAsync( UpdateFirewallPolicyChangeProtectionRequest request) { return updateFirewallPolicyChangeProtectionAsync(request, null); } @Override public java.util.concurrent.Future updateFirewallPolicyChangeProtectionAsync( final UpdateFirewallPolicyChangeProtectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFirewallPolicyChangeProtectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFirewallPolicyChangeProtectionResult call() throws Exception { UpdateFirewallPolicyChangeProtectionResult result = null; try { result = executeUpdateFirewallPolicyChangeProtection(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 updateLoggingConfigurationAsync(UpdateLoggingConfigurationRequest request) { return updateLoggingConfigurationAsync(request, null); } @Override public java.util.concurrent.Future updateLoggingConfigurationAsync(final UpdateLoggingConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateLoggingConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateLoggingConfigurationResult call() throws Exception { UpdateLoggingConfigurationResult result = null; try { result = executeUpdateLoggingConfiguration(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 updateSubnetChangeProtectionAsync(UpdateSubnetChangeProtectionRequest request) { return updateSubnetChangeProtectionAsync(request, null); } @Override public java.util.concurrent.Future updateSubnetChangeProtectionAsync(final UpdateSubnetChangeProtectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSubnetChangeProtectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSubnetChangeProtectionResult call() throws Exception { UpdateSubnetChangeProtectionResult result = null; try { result = executeUpdateSubnetChangeProtection(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 updateTLSInspectionConfigurationAsync( UpdateTLSInspectionConfigurationRequest request) { return updateTLSInspectionConfigurationAsync(request, null); } @Override public java.util.concurrent.Future updateTLSInspectionConfigurationAsync( final UpdateTLSInspectionConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateTLSInspectionConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateTLSInspectionConfigurationResult call() throws Exception { UpdateTLSInspectionConfigurationResult result = null; try { result = executeUpdateTLSInspectionConfiguration(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