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

com.amazonaws.services.iotthingsgraph.AWSIoTThingsGraphAsyncClient Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.iotthingsgraph;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS IoT Things Graph 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.
 * 

* AWS IoT Things Graph *

* AWS IoT Things Graph provides an integrated set of tools that enable developers to connect devices and services that * use different standards, such as units of measure and communication protocols. AWS IoT Things Graph makes it possible * to build IoT applications with little to no code by connecting devices and services and defining how they interact at * an abstract level. *

*

* For more information about how AWS IoT Things Graph works, see the User Guide. *

*

* The AWS IoT Things Graph service is discontinued. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSIoTThingsGraphAsyncClient extends AWSIoTThingsGraphClient implements AWSIoTThingsGraphAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSIoTThingsGraphAsyncClientBuilder asyncBuilder() { return AWSIoTThingsGraphAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS IoT Things Graph using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSIoTThingsGraphAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS IoT Things Graph using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSIoTThingsGraphAsyncClient(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 @Deprecated public java.util.concurrent.Future associateEntityToThingAsync(AssociateEntityToThingRequest request) { return associateEntityToThingAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future associateEntityToThingAsync(final AssociateEntityToThingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateEntityToThingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateEntityToThingResult call() throws Exception { AssociateEntityToThingResult result = null; try { result = executeAssociateEntityToThing(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future createFlowTemplateAsync(CreateFlowTemplateRequest request) { return createFlowTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future createFlowTemplateAsync(final CreateFlowTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFlowTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFlowTemplateResult call() throws Exception { CreateFlowTemplateResult result = null; try { result = executeCreateFlowTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future createSystemInstanceAsync(CreateSystemInstanceRequest request) { return createSystemInstanceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future createSystemInstanceAsync(final CreateSystemInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSystemInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSystemInstanceResult call() throws Exception { CreateSystemInstanceResult result = null; try { result = executeCreateSystemInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future createSystemTemplateAsync(CreateSystemTemplateRequest request) { return createSystemTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future createSystemTemplateAsync(final CreateSystemTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSystemTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSystemTemplateResult call() throws Exception { CreateSystemTemplateResult result = null; try { result = executeCreateSystemTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deleteFlowTemplateAsync(DeleteFlowTemplateRequest request) { return deleteFlowTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deleteFlowTemplateAsync(final DeleteFlowTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFlowTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFlowTemplateResult call() throws Exception { DeleteFlowTemplateResult result = null; try { result = executeDeleteFlowTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deleteNamespaceAsync(DeleteNamespaceRequest request) { return deleteNamespaceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deleteNamespaceAsync(final DeleteNamespaceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteNamespaceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteNamespaceResult call() throws Exception { DeleteNamespaceResult result = null; try { result = executeDeleteNamespace(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deleteSystemInstanceAsync(DeleteSystemInstanceRequest request) { return deleteSystemInstanceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deleteSystemInstanceAsync(final DeleteSystemInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSystemInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSystemInstanceResult call() throws Exception { DeleteSystemInstanceResult result = null; try { result = executeDeleteSystemInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deleteSystemTemplateAsync(DeleteSystemTemplateRequest request) { return deleteSystemTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deleteSystemTemplateAsync(final DeleteSystemTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSystemTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSystemTemplateResult call() throws Exception { DeleteSystemTemplateResult result = null; try { result = executeDeleteSystemTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deploySystemInstanceAsync(DeploySystemInstanceRequest request) { return deploySystemInstanceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deploySystemInstanceAsync(final DeploySystemInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeploySystemInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeploySystemInstanceResult call() throws Exception { DeploySystemInstanceResult result = null; try { result = executeDeploySystemInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deprecateFlowTemplateAsync(DeprecateFlowTemplateRequest request) { return deprecateFlowTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deprecateFlowTemplateAsync(final DeprecateFlowTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeprecateFlowTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeprecateFlowTemplateResult call() throws Exception { DeprecateFlowTemplateResult result = null; try { result = executeDeprecateFlowTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future deprecateSystemTemplateAsync(DeprecateSystemTemplateRequest request) { return deprecateSystemTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future deprecateSystemTemplateAsync(final DeprecateSystemTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeprecateSystemTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeprecateSystemTemplateResult call() throws Exception { DeprecateSystemTemplateResult result = null; try { result = executeDeprecateSystemTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future describeNamespaceAsync(DescribeNamespaceRequest request) { return describeNamespaceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future describeNamespaceAsync(final DescribeNamespaceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeNamespaceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeNamespaceResult call() throws Exception { DescribeNamespaceResult result = null; try { result = executeDescribeNamespace(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future dissociateEntityFromThingAsync(DissociateEntityFromThingRequest request) { return dissociateEntityFromThingAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future dissociateEntityFromThingAsync(final DissociateEntityFromThingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DissociateEntityFromThingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DissociateEntityFromThingResult call() throws Exception { DissociateEntityFromThingResult result = null; try { result = executeDissociateEntityFromThing(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getEntitiesAsync(GetEntitiesRequest request) { return getEntitiesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getEntitiesAsync(final GetEntitiesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEntitiesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEntitiesResult call() throws Exception { GetEntitiesResult result = null; try { result = executeGetEntities(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getFlowTemplateAsync(GetFlowTemplateRequest request) { return getFlowTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getFlowTemplateAsync(final GetFlowTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFlowTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFlowTemplateResult call() throws Exception { GetFlowTemplateResult result = null; try { result = executeGetFlowTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getFlowTemplateRevisionsAsync(GetFlowTemplateRevisionsRequest request) { return getFlowTemplateRevisionsAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getFlowTemplateRevisionsAsync(final GetFlowTemplateRevisionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetFlowTemplateRevisionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetFlowTemplateRevisionsResult call() throws Exception { GetFlowTemplateRevisionsResult result = null; try { result = executeGetFlowTemplateRevisions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getNamespaceDeletionStatusAsync(GetNamespaceDeletionStatusRequest request) { return getNamespaceDeletionStatusAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getNamespaceDeletionStatusAsync(final GetNamespaceDeletionStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetNamespaceDeletionStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetNamespaceDeletionStatusResult call() throws Exception { GetNamespaceDeletionStatusResult result = null; try { result = executeGetNamespaceDeletionStatus(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getSystemInstanceAsync(GetSystemInstanceRequest request) { return getSystemInstanceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getSystemInstanceAsync(final GetSystemInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSystemInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSystemInstanceResult call() throws Exception { GetSystemInstanceResult result = null; try { result = executeGetSystemInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getSystemTemplateAsync(GetSystemTemplateRequest request) { return getSystemTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getSystemTemplateAsync(final GetSystemTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSystemTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSystemTemplateResult call() throws Exception { GetSystemTemplateResult result = null; try { result = executeGetSystemTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getSystemTemplateRevisionsAsync(GetSystemTemplateRevisionsRequest request) { return getSystemTemplateRevisionsAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getSystemTemplateRevisionsAsync(final GetSystemTemplateRevisionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetSystemTemplateRevisionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetSystemTemplateRevisionsResult call() throws Exception { GetSystemTemplateRevisionsResult result = null; try { result = executeGetSystemTemplateRevisions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future getUploadStatusAsync(GetUploadStatusRequest request) { return getUploadStatusAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future getUploadStatusAsync(final GetUploadStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetUploadStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetUploadStatusResult call() throws Exception { GetUploadStatusResult result = null; try { result = executeGetUploadStatus(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future listFlowExecutionMessagesAsync(ListFlowExecutionMessagesRequest request) { return listFlowExecutionMessagesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future listFlowExecutionMessagesAsync(final ListFlowExecutionMessagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListFlowExecutionMessagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListFlowExecutionMessagesResult call() throws Exception { ListFlowExecutionMessagesResult result = null; try { result = executeListFlowExecutionMessages(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) { return listTagsForResourceAsync(request, null); } @Override @Deprecated 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 @Deprecated public java.util.concurrent.Future searchEntitiesAsync(SearchEntitiesRequest request) { return searchEntitiesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future searchEntitiesAsync(final SearchEntitiesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchEntitiesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchEntitiesResult call() throws Exception { SearchEntitiesResult result = null; try { result = executeSearchEntities(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future searchFlowExecutionsAsync(SearchFlowExecutionsRequest request) { return searchFlowExecutionsAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future searchFlowExecutionsAsync(final SearchFlowExecutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchFlowExecutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchFlowExecutionsResult call() throws Exception { SearchFlowExecutionsResult result = null; try { result = executeSearchFlowExecutions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future searchFlowTemplatesAsync(SearchFlowTemplatesRequest request) { return searchFlowTemplatesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future searchFlowTemplatesAsync(final SearchFlowTemplatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchFlowTemplatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchFlowTemplatesResult call() throws Exception { SearchFlowTemplatesResult result = null; try { result = executeSearchFlowTemplates(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future searchSystemInstancesAsync(SearchSystemInstancesRequest request) { return searchSystemInstancesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future searchSystemInstancesAsync(final SearchSystemInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchSystemInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchSystemInstancesResult call() throws Exception { SearchSystemInstancesResult result = null; try { result = executeSearchSystemInstances(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future searchSystemTemplatesAsync(SearchSystemTemplatesRequest request) { return searchSystemTemplatesAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future searchSystemTemplatesAsync(final SearchSystemTemplatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchSystemTemplatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchSystemTemplatesResult call() throws Exception { SearchSystemTemplatesResult result = null; try { result = executeSearchSystemTemplates(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future searchThingsAsync(SearchThingsRequest request) { return searchThingsAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future searchThingsAsync(final SearchThingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchThingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchThingsResult call() throws Exception { SearchThingsResult result = null; try { result = executeSearchThings(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) { return tagResourceAsync(request, null); } @Override @Deprecated 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 @Deprecated public java.util.concurrent.Future undeploySystemInstanceAsync(UndeploySystemInstanceRequest request) { return undeploySystemInstanceAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future undeploySystemInstanceAsync(final UndeploySystemInstanceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UndeploySystemInstanceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UndeploySystemInstanceResult call() throws Exception { UndeploySystemInstanceResult result = null; try { result = executeUndeploySystemInstance(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) { return untagResourceAsync(request, null); } @Override @Deprecated 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 @Deprecated public java.util.concurrent.Future updateFlowTemplateAsync(UpdateFlowTemplateRequest request) { return updateFlowTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future updateFlowTemplateAsync(final UpdateFlowTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFlowTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFlowTemplateResult call() throws Exception { UpdateFlowTemplateResult result = null; try { result = executeUpdateFlowTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future updateSystemTemplateAsync(UpdateSystemTemplateRequest request) { return updateSystemTemplateAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future updateSystemTemplateAsync(final UpdateSystemTemplateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSystemTemplateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSystemTemplateResult call() throws Exception { UpdateSystemTemplateResult result = null; try { result = executeUpdateSystemTemplate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future uploadEntityDefinitionsAsync(UploadEntityDefinitionsRequest request) { return uploadEntityDefinitionsAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future uploadEntityDefinitionsAsync(final UploadEntityDefinitionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UploadEntityDefinitionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UploadEntityDefinitionsResult call() throws Exception { UploadEntityDefinitionsResult result = null; try { result = executeUploadEntityDefinitions(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 - 2025 Weber Informatics LLC | Privacy Policy