com.amazonaws.services.appflow.AmazonAppflowAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appflow Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.appflow;
import javax.annotation.Generated;
import com.amazonaws.services.appflow.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Amazon Appflow 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.
*
*
* Welcome to the Amazon AppFlow API reference. This guide is for developers who need detailed information about the
* Amazon AppFlow API operations, data types, and errors.
*
*
* Amazon AppFlow is a fully managed integration service that enables you to securely transfer data between software as
* a service (SaaS) applications like Salesforce, Marketo, Slack, and ServiceNow, and Amazon Web Services like Amazon S3
* and Amazon Redshift.
*
*
* Use the following links to get started on the Amazon AppFlow API:
*
*
* -
*
* Actions: An alphabetical list
* of all Amazon AppFlow API operations.
*
*
* -
*
* Data types: An alphabetical list of
* all Amazon AppFlow data types.
*
*
* -
*
* Common parameters:
* Parameters that all Query operations can use.
*
*
* -
*
* Common errors: Client and server
* errors that all operations can return.
*
*
*
*
* If you're new to Amazon AppFlow, we recommend that you review the Amazon AppFlow User Guide.
*
*
* Amazon AppFlow API users can use vendor-specific mechanisms for OAuth, and include applicable OAuth attributes (such
* as auth-code
and redirecturi
) with the connector-specific
* ConnectorProfileProperties
when creating a new connector profile using Amazon AppFlow API operations.
* For example, Salesforce users can refer to the Authorize Apps with OAuth
* documentation.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonAppflowAsyncClient extends AmazonAppflowClient implements AmazonAppflowAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonAppflowAsyncClientBuilder asyncBuilder() {
return AmazonAppflowAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Appflow using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonAppflowAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Appflow using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonAppflowAsyncClient(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 cancelFlowExecutionsAsync(CancelFlowExecutionsRequest request) {
return cancelFlowExecutionsAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelFlowExecutionsAsync(final CancelFlowExecutionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelFlowExecutionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelFlowExecutionsResult call() throws Exception {
CancelFlowExecutionsResult result = null;
try {
result = executeCancelFlowExecutions(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 createConnectorProfileAsync(CreateConnectorProfileRequest request) {
return createConnectorProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future createConnectorProfileAsync(final CreateConnectorProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConnectorProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConnectorProfileResult call() throws Exception {
CreateConnectorProfileResult result = null;
try {
result = executeCreateConnectorProfile(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 createFlowAsync(CreateFlowRequest request) {
return createFlowAsync(request, null);
}
@Override
public java.util.concurrent.Future createFlowAsync(final CreateFlowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateFlowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateFlowResult call() throws Exception {
CreateFlowResult result = null;
try {
result = executeCreateFlow(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 deleteConnectorProfileAsync(DeleteConnectorProfileRequest request) {
return deleteConnectorProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConnectorProfileAsync(final DeleteConnectorProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConnectorProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConnectorProfileResult call() throws Exception {
DeleteConnectorProfileResult result = null;
try {
result = executeDeleteConnectorProfile(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 deleteFlowAsync(DeleteFlowRequest request) {
return deleteFlowAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteFlowAsync(final DeleteFlowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFlowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFlowResult call() throws Exception {
DeleteFlowResult result = null;
try {
result = executeDeleteFlow(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 describeConnectorAsync(DescribeConnectorRequest request) {
return describeConnectorAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConnectorAsync(final DescribeConnectorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectorResult call() throws Exception {
DescribeConnectorResult result = null;
try {
result = executeDescribeConnector(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 describeConnectorEntityAsync(DescribeConnectorEntityRequest request) {
return describeConnectorEntityAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConnectorEntityAsync(final DescribeConnectorEntityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectorEntityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectorEntityResult call() throws Exception {
DescribeConnectorEntityResult result = null;
try {
result = executeDescribeConnectorEntity(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 describeConnectorProfilesAsync(DescribeConnectorProfilesRequest request) {
return describeConnectorProfilesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConnectorProfilesAsync(final DescribeConnectorProfilesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectorProfilesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectorProfilesResult call() throws Exception {
DescribeConnectorProfilesResult result = null;
try {
result = executeDescribeConnectorProfiles(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 describeConnectorsAsync(DescribeConnectorsRequest request) {
return describeConnectorsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeConnectorsAsync(final DescribeConnectorsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeConnectorsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeConnectorsResult call() throws Exception {
DescribeConnectorsResult result = null;
try {
result = executeDescribeConnectors(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 describeFlowAsync(DescribeFlowRequest request) {
return describeFlowAsync(request, null);
}
@Override
public java.util.concurrent.Future describeFlowAsync(final DescribeFlowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFlowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFlowResult call() throws Exception {
DescribeFlowResult result = null;
try {
result = executeDescribeFlow(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 describeFlowExecutionRecordsAsync(DescribeFlowExecutionRecordsRequest request) {
return describeFlowExecutionRecordsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeFlowExecutionRecordsAsync(final DescribeFlowExecutionRecordsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFlowExecutionRecordsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFlowExecutionRecordsResult call() throws Exception {
DescribeFlowExecutionRecordsResult result = null;
try {
result = executeDescribeFlowExecutionRecords(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 listConnectorEntitiesAsync(ListConnectorEntitiesRequest request) {
return listConnectorEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future listConnectorEntitiesAsync(final ListConnectorEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListConnectorEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListConnectorEntitiesResult call() throws Exception {
ListConnectorEntitiesResult result = null;
try {
result = executeListConnectorEntities(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 listConnectorsAsync(ListConnectorsRequest request) {
return listConnectorsAsync(request, null);
}
@Override
public java.util.concurrent.Future listConnectorsAsync(final ListConnectorsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListConnectorsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListConnectorsResult call() throws Exception {
ListConnectorsResult result = null;
try {
result = executeListConnectors(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 listFlowsAsync(ListFlowsRequest request) {
return listFlowsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFlowsAsync(final ListFlowsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFlowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFlowsResult call() throws Exception {
ListFlowsResult result = null;
try {
result = executeListFlows(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 registerConnectorAsync(RegisterConnectorRequest request) {
return registerConnectorAsync(request, null);
}
@Override
public java.util.concurrent.Future registerConnectorAsync(final RegisterConnectorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RegisterConnectorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RegisterConnectorResult call() throws Exception {
RegisterConnectorResult result = null;
try {
result = executeRegisterConnector(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 resetConnectorMetadataCacheAsync(ResetConnectorMetadataCacheRequest request) {
return resetConnectorMetadataCacheAsync(request, null);
}
@Override
public java.util.concurrent.Future resetConnectorMetadataCacheAsync(final ResetConnectorMetadataCacheRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ResetConnectorMetadataCacheRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ResetConnectorMetadataCacheResult call() throws Exception {
ResetConnectorMetadataCacheResult result = null;
try {
result = executeResetConnectorMetadataCache(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 startFlowAsync(StartFlowRequest request) {
return startFlowAsync(request, null);
}
@Override
public java.util.concurrent.Future startFlowAsync(final StartFlowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartFlowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartFlowResult call() throws Exception {
StartFlowResult result = null;
try {
result = executeStartFlow(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 stopFlowAsync(StopFlowRequest request) {
return stopFlowAsync(request, null);
}
@Override
public java.util.concurrent.Future stopFlowAsync(final StopFlowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopFlowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopFlowResult call() throws Exception {
StopFlowResult result = null;
try {
result = executeStopFlow(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 unregisterConnectorAsync(UnregisterConnectorRequest request) {
return unregisterConnectorAsync(request, null);
}
@Override
public java.util.concurrent.Future unregisterConnectorAsync(final UnregisterConnectorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UnregisterConnectorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UnregisterConnectorResult call() throws Exception {
UnregisterConnectorResult result = null;
try {
result = executeUnregisterConnector(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 updateConnectorProfileAsync(UpdateConnectorProfileRequest request) {
return updateConnectorProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future updateConnectorProfileAsync(final UpdateConnectorProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateConnectorProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateConnectorProfileResult call() throws Exception {
UpdateConnectorProfileResult result = null;
try {
result = executeUpdateConnectorProfile(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 updateConnectorRegistrationAsync(UpdateConnectorRegistrationRequest request) {
return updateConnectorRegistrationAsync(request, null);
}
@Override
public java.util.concurrent.Future updateConnectorRegistrationAsync(final UpdateConnectorRegistrationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateConnectorRegistrationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateConnectorRegistrationResult call() throws Exception {
UpdateConnectorRegistrationResult result = null;
try {
result = executeUpdateConnectorRegistration(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 updateFlowAsync(UpdateFlowRequest request) {
return updateFlowAsync(request, null);
}
@Override
public java.util.concurrent.Future updateFlowAsync(final UpdateFlowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateFlowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateFlowResult call() throws Exception {
UpdateFlowResult result = null;
try {
result = executeUpdateFlow(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();
}
}