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

com.amazonaws.services.greengrassv2.AWSGreengrassV2AsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS IoT Greengrass V2 module holds the client classes that are used for communicating with AWS IoT Greengrass V2 Service

There is a newer version: 1.12.778
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.greengrassv2;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS GreengrassV2 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.
 * 

*

* IoT Greengrass brings local compute, messaging, data management, sync, and ML inference capabilities to edge devices. * This enables devices to collect and analyze data closer to the source of information, react autonomously to local * events, and communicate securely with each other on local networks. Local devices can also communicate securely with * Amazon Web Services IoT Core and export IoT data to the Amazon Web Services Cloud. IoT Greengrass developers can use * Lambda functions and components to create and deploy applications to fleets of edge devices for local operation. *

*

* IoT Greengrass Version 2 provides a new major version of the IoT Greengrass Core software, new APIs, and a new * console. Use this API reference to learn how to use the IoT Greengrass V2 API operations to manage components, manage * deployments, and core devices. *

*

* For more information, see What is IoT * Greengrass? in the IoT Greengrass V2 Developer Guide. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSGreengrassV2AsyncClient extends AWSGreengrassV2Client implements AWSGreengrassV2Async { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSGreengrassV2AsyncClientBuilder asyncBuilder() { return AWSGreengrassV2AsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS GreengrassV2 using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSGreengrassV2AsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS GreengrassV2 using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSGreengrassV2AsyncClient(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 associateServiceRoleToAccountAsync(AssociateServiceRoleToAccountRequest request) { return associateServiceRoleToAccountAsync(request, null); } @Override public java.util.concurrent.Future associateServiceRoleToAccountAsync( final AssociateServiceRoleToAccountRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateServiceRoleToAccountRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateServiceRoleToAccountResult call() throws Exception { AssociateServiceRoleToAccountResult result = null; try { result = executeAssociateServiceRoleToAccount(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 batchAssociateClientDeviceWithCoreDeviceAsync( BatchAssociateClientDeviceWithCoreDeviceRequest request) { return batchAssociateClientDeviceWithCoreDeviceAsync(request, null); } @Override public java.util.concurrent.Future batchAssociateClientDeviceWithCoreDeviceAsync( final BatchAssociateClientDeviceWithCoreDeviceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchAssociateClientDeviceWithCoreDeviceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchAssociateClientDeviceWithCoreDeviceResult call() throws Exception { BatchAssociateClientDeviceWithCoreDeviceResult result = null; try { result = executeBatchAssociateClientDeviceWithCoreDevice(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 batchDisassociateClientDeviceFromCoreDeviceAsync( BatchDisassociateClientDeviceFromCoreDeviceRequest request) { return batchDisassociateClientDeviceFromCoreDeviceAsync(request, null); } @Override public java.util.concurrent.Future batchDisassociateClientDeviceFromCoreDeviceAsync( final BatchDisassociateClientDeviceFromCoreDeviceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchDisassociateClientDeviceFromCoreDeviceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchDisassociateClientDeviceFromCoreDeviceResult call() throws Exception { BatchDisassociateClientDeviceFromCoreDeviceResult result = null; try { result = executeBatchDisassociateClientDeviceFromCoreDevice(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 cancelDeploymentAsync(CancelDeploymentRequest request) { return cancelDeploymentAsync(request, null); } @Override public java.util.concurrent.Future cancelDeploymentAsync(final CancelDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelDeploymentResult call() throws Exception { CancelDeploymentResult result = null; try { result = executeCancelDeployment(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 createComponentVersionAsync(CreateComponentVersionRequest request) { return createComponentVersionAsync(request, null); } @Override public java.util.concurrent.Future createComponentVersionAsync(final CreateComponentVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateComponentVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateComponentVersionResult call() throws Exception { CreateComponentVersionResult result = null; try { result = executeCreateComponentVersion(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 createDeploymentAsync(CreateDeploymentRequest request) { return createDeploymentAsync(request, null); } @Override public java.util.concurrent.Future createDeploymentAsync(final CreateDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDeploymentResult call() throws Exception { CreateDeploymentResult result = null; try { result = executeCreateDeployment(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 deleteComponentAsync(DeleteComponentRequest request) { return deleteComponentAsync(request, null); } @Override public java.util.concurrent.Future deleteComponentAsync(final DeleteComponentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteComponentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteComponentResult call() throws Exception { DeleteComponentResult result = null; try { result = executeDeleteComponent(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 deleteCoreDeviceAsync(DeleteCoreDeviceRequest request) { return deleteCoreDeviceAsync(request, null); } @Override public java.util.concurrent.Future deleteCoreDeviceAsync(final DeleteCoreDeviceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCoreDeviceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCoreDeviceResult call() throws Exception { DeleteCoreDeviceResult result = null; try { result = executeDeleteCoreDevice(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 deleteDeploymentAsync(DeleteDeploymentRequest request) { return deleteDeploymentAsync(request, null); } @Override public java.util.concurrent.Future deleteDeploymentAsync(final DeleteDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDeploymentResult call() throws Exception { DeleteDeploymentResult result = null; try { result = executeDeleteDeployment(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 describeComponentAsync(DescribeComponentRequest request) { return describeComponentAsync(request, null); } @Override public java.util.concurrent.Future describeComponentAsync(final DescribeComponentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeComponentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeComponentResult call() throws Exception { DescribeComponentResult result = null; try { result = executeDescribeComponent(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 disassociateServiceRoleFromAccountAsync( DisassociateServiceRoleFromAccountRequest request) { return disassociateServiceRoleFromAccountAsync(request, null); } @Override public java.util.concurrent.Future disassociateServiceRoleFromAccountAsync( final DisassociateServiceRoleFromAccountRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateServiceRoleFromAccountRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateServiceRoleFromAccountResult call() throws Exception { DisassociateServiceRoleFromAccountResult result = null; try { result = executeDisassociateServiceRoleFromAccount(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 getComponentAsync(GetComponentRequest request) { return getComponentAsync(request, null); } @Override public java.util.concurrent.Future getComponentAsync(final GetComponentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetComponentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetComponentResult call() throws Exception { GetComponentResult result = null; try { result = executeGetComponent(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 getComponentVersionArtifactAsync(GetComponentVersionArtifactRequest request) { return getComponentVersionArtifactAsync(request, null); } @Override public java.util.concurrent.Future getComponentVersionArtifactAsync(final GetComponentVersionArtifactRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetComponentVersionArtifactRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetComponentVersionArtifactResult call() throws Exception { GetComponentVersionArtifactResult result = null; try { result = executeGetComponentVersionArtifact(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 getConnectivityInfoAsync(GetConnectivityInfoRequest request) { return getConnectivityInfoAsync(request, null); } @Override public java.util.concurrent.Future getConnectivityInfoAsync(final GetConnectivityInfoRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetConnectivityInfoRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetConnectivityInfoResult call() throws Exception { GetConnectivityInfoResult result = null; try { result = executeGetConnectivityInfo(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 getCoreDeviceAsync(GetCoreDeviceRequest request) { return getCoreDeviceAsync(request, null); } @Override public java.util.concurrent.Future getCoreDeviceAsync(final GetCoreDeviceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCoreDeviceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCoreDeviceResult call() throws Exception { GetCoreDeviceResult result = null; try { result = executeGetCoreDevice(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 getDeploymentAsync(GetDeploymentRequest request) { return getDeploymentAsync(request, null); } @Override public java.util.concurrent.Future getDeploymentAsync(final GetDeploymentRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDeploymentRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDeploymentResult call() throws Exception { GetDeploymentResult result = null; try { result = executeGetDeployment(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 getServiceRoleForAccountAsync(GetServiceRoleForAccountRequest request) { return getServiceRoleForAccountAsync(request, null); } @Override public java.util.concurrent.Future getServiceRoleForAccountAsync(final GetServiceRoleForAccountRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetServiceRoleForAccountRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetServiceRoleForAccountResult call() throws Exception { GetServiceRoleForAccountResult result = null; try { result = executeGetServiceRoleForAccount(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 listClientDevicesAssociatedWithCoreDeviceAsync( ListClientDevicesAssociatedWithCoreDeviceRequest request) { return listClientDevicesAssociatedWithCoreDeviceAsync(request, null); } @Override public java.util.concurrent.Future listClientDevicesAssociatedWithCoreDeviceAsync( final ListClientDevicesAssociatedWithCoreDeviceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListClientDevicesAssociatedWithCoreDeviceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListClientDevicesAssociatedWithCoreDeviceResult call() throws Exception { ListClientDevicesAssociatedWithCoreDeviceResult result = null; try { result = executeListClientDevicesAssociatedWithCoreDevice(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 listComponentVersionsAsync(ListComponentVersionsRequest request) { return listComponentVersionsAsync(request, null); } @Override public java.util.concurrent.Future listComponentVersionsAsync(final ListComponentVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListComponentVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListComponentVersionsResult call() throws Exception { ListComponentVersionsResult result = null; try { result = executeListComponentVersions(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 listComponentsAsync(ListComponentsRequest request) { return listComponentsAsync(request, null); } @Override public java.util.concurrent.Future listComponentsAsync(final ListComponentsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListComponentsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListComponentsResult call() throws Exception { ListComponentsResult result = null; try { result = executeListComponents(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 listCoreDevicesAsync(ListCoreDevicesRequest request) { return listCoreDevicesAsync(request, null); } @Override public java.util.concurrent.Future listCoreDevicesAsync(final ListCoreDevicesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCoreDevicesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCoreDevicesResult call() throws Exception { ListCoreDevicesResult result = null; try { result = executeListCoreDevices(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 listDeploymentsAsync(ListDeploymentsRequest request) { return listDeploymentsAsync(request, null); } @Override public java.util.concurrent.Future listDeploymentsAsync(final ListDeploymentsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDeploymentsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDeploymentsResult call() throws Exception { ListDeploymentsResult result = null; try { result = executeListDeployments(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 listEffectiveDeploymentsAsync(ListEffectiveDeploymentsRequest request) { return listEffectiveDeploymentsAsync(request, null); } @Override public java.util.concurrent.Future listEffectiveDeploymentsAsync(final ListEffectiveDeploymentsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEffectiveDeploymentsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEffectiveDeploymentsResult call() throws Exception { ListEffectiveDeploymentsResult result = null; try { result = executeListEffectiveDeployments(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 listInstalledComponentsAsync(ListInstalledComponentsRequest request) { return listInstalledComponentsAsync(request, null); } @Override public java.util.concurrent.Future listInstalledComponentsAsync(final ListInstalledComponentsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInstalledComponentsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInstalledComponentsResult call() throws Exception { ListInstalledComponentsResult result = null; try { result = executeListInstalledComponents(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 resolveComponentCandidatesAsync(ResolveComponentCandidatesRequest request) { return resolveComponentCandidatesAsync(request, null); } @Override public java.util.concurrent.Future resolveComponentCandidatesAsync(final ResolveComponentCandidatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ResolveComponentCandidatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ResolveComponentCandidatesResult call() throws Exception { ResolveComponentCandidatesResult result = null; try { result = executeResolveComponentCandidates(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 updateConnectivityInfoAsync(UpdateConnectivityInfoRequest request) { return updateConnectivityInfoAsync(request, null); } @Override public java.util.concurrent.Future updateConnectivityInfoAsync(final UpdateConnectivityInfoRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateConnectivityInfoRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateConnectivityInfoResult call() throws Exception { UpdateConnectivityInfoResult result = null; try { result = executeUpdateConnectivityInfo(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