com.amazonaws.services.b2bi.AWSB2BiAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-b2bi 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.b2bi;
import javax.annotation.Generated;
import com.amazonaws.services.b2bi.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing AWS B2BI 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 Amazon Web Services B2B Data Interchange API Reference. It provides descriptions, API request
* parameters, and the XML response for each of the B2BI API actions.
*
*
* B2BI enables automated exchange of EDI (electronic data interchange) based business-critical transactions at cloud
* scale, with elasticity and pay-as-you-go pricing. Businesses use EDI documents to exchange transactional data with
* trading partners, such as suppliers and end customers, using standardized formats such as X12.
*
*
*
* Rather than actually running a command, you can use the --generate-cli-skeleton
parameter with any API
* call to generate and display a parameter template. You can then use the generated template to customize and use as
* input on a later command. For details, see Generate
* and use a parameter skeleton file.
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSB2BiAsyncClient extends AWSB2BiClient implements AWSB2BiAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSB2BiAsyncClientBuilder asyncBuilder() {
return AWSB2BiAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS B2BI using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSB2BiAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS B2BI using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSB2BiAsyncClient(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 createCapabilityAsync(CreateCapabilityRequest request) {
return createCapabilityAsync(request, null);
}
@Override
public java.util.concurrent.Future createCapabilityAsync(final CreateCapabilityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCapabilityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCapabilityResult call() throws Exception {
CreateCapabilityResult result = null;
try {
result = executeCreateCapability(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 createPartnershipAsync(CreatePartnershipRequest request) {
return createPartnershipAsync(request, null);
}
@Override
public java.util.concurrent.Future createPartnershipAsync(final CreatePartnershipRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePartnershipRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePartnershipResult call() throws Exception {
CreatePartnershipResult result = null;
try {
result = executeCreatePartnership(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 createProfileAsync(CreateProfileRequest request) {
return createProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future createProfileAsync(final CreateProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateProfileResult call() throws Exception {
CreateProfileResult result = null;
try {
result = executeCreateProfile(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 createTransformerAsync(CreateTransformerRequest request) {
return createTransformerAsync(request, null);
}
@Override
public java.util.concurrent.Future createTransformerAsync(final CreateTransformerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTransformerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTransformerResult call() throws Exception {
CreateTransformerResult result = null;
try {
result = executeCreateTransformer(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 deleteCapabilityAsync(DeleteCapabilityRequest request) {
return deleteCapabilityAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteCapabilityAsync(final DeleteCapabilityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteCapabilityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteCapabilityResult call() throws Exception {
DeleteCapabilityResult result = null;
try {
result = executeDeleteCapability(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 deletePartnershipAsync(DeletePartnershipRequest request) {
return deletePartnershipAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePartnershipAsync(final DeletePartnershipRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePartnershipRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePartnershipResult call() throws Exception {
DeletePartnershipResult result = null;
try {
result = executeDeletePartnership(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 deleteProfileAsync(DeleteProfileRequest request) {
return deleteProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteProfileAsync(final DeleteProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteProfileResult call() throws Exception {
DeleteProfileResult result = null;
try {
result = executeDeleteProfile(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 deleteTransformerAsync(DeleteTransformerRequest request) {
return deleteTransformerAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteTransformerAsync(final DeleteTransformerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteTransformerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteTransformerResult call() throws Exception {
DeleteTransformerResult result = null;
try {
result = executeDeleteTransformer(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 getCapabilityAsync(GetCapabilityRequest request) {
return getCapabilityAsync(request, null);
}
@Override
public java.util.concurrent.Future getCapabilityAsync(final GetCapabilityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCapabilityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCapabilityResult call() throws Exception {
GetCapabilityResult result = null;
try {
result = executeGetCapability(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 getPartnershipAsync(GetPartnershipRequest request) {
return getPartnershipAsync(request, null);
}
@Override
public java.util.concurrent.Future getPartnershipAsync(final GetPartnershipRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetPartnershipRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetPartnershipResult call() throws Exception {
GetPartnershipResult result = null;
try {
result = executeGetPartnership(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 getProfileAsync(GetProfileRequest request) {
return getProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future getProfileAsync(final GetProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetProfileResult call() throws Exception {
GetProfileResult result = null;
try {
result = executeGetProfile(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 getTransformerAsync(GetTransformerRequest request) {
return getTransformerAsync(request, null);
}
@Override
public java.util.concurrent.Future getTransformerAsync(final GetTransformerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTransformerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTransformerResult call() throws Exception {
GetTransformerResult result = null;
try {
result = executeGetTransformer(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 getTransformerJobAsync(GetTransformerJobRequest request) {
return getTransformerJobAsync(request, null);
}
@Override
public java.util.concurrent.Future getTransformerJobAsync(final GetTransformerJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTransformerJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTransformerJobResult call() throws Exception {
GetTransformerJobResult result = null;
try {
result = executeGetTransformerJob(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 listCapabilitiesAsync(ListCapabilitiesRequest request) {
return listCapabilitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future listCapabilitiesAsync(final ListCapabilitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCapabilitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCapabilitiesResult call() throws Exception {
ListCapabilitiesResult result = null;
try {
result = executeListCapabilities(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 listPartnershipsAsync(ListPartnershipsRequest request) {
return listPartnershipsAsync(request, null);
}
@Override
public java.util.concurrent.Future listPartnershipsAsync(final ListPartnershipsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPartnershipsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPartnershipsResult call() throws Exception {
ListPartnershipsResult result = null;
try {
result = executeListPartnerships(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 listProfilesAsync(ListProfilesRequest request) {
return listProfilesAsync(request, null);
}
@Override
public java.util.concurrent.Future listProfilesAsync(final ListProfilesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListProfilesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListProfilesResult call() throws Exception {
ListProfilesResult result = null;
try {
result = executeListProfiles(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 listTransformersAsync(ListTransformersRequest request) {
return listTransformersAsync(request, null);
}
@Override
public java.util.concurrent.Future listTransformersAsync(final ListTransformersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTransformersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTransformersResult call() throws Exception {
ListTransformersResult result = null;
try {
result = executeListTransformers(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 startTransformerJobAsync(StartTransformerJobRequest request) {
return startTransformerJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startTransformerJobAsync(final StartTransformerJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartTransformerJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartTransformerJobResult call() throws Exception {
StartTransformerJobResult result = null;
try {
result = executeStartTransformerJob(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 testMappingAsync(TestMappingRequest request) {
return testMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future testMappingAsync(final TestMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TestMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TestMappingResult call() throws Exception {
TestMappingResult result = null;
try {
result = executeTestMapping(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 testParsingAsync(TestParsingRequest request) {
return testParsingAsync(request, null);
}
@Override
public java.util.concurrent.Future testParsingAsync(final TestParsingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TestParsingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TestParsingResult call() throws Exception {
TestParsingResult result = null;
try {
result = executeTestParsing(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 updateCapabilityAsync(UpdateCapabilityRequest request) {
return updateCapabilityAsync(request, null);
}
@Override
public java.util.concurrent.Future updateCapabilityAsync(final UpdateCapabilityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateCapabilityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateCapabilityResult call() throws Exception {
UpdateCapabilityResult result = null;
try {
result = executeUpdateCapability(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 updatePartnershipAsync(UpdatePartnershipRequest request) {
return updatePartnershipAsync(request, null);
}
@Override
public java.util.concurrent.Future updatePartnershipAsync(final UpdatePartnershipRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdatePartnershipRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdatePartnershipResult call() throws Exception {
UpdatePartnershipResult result = null;
try {
result = executeUpdatePartnership(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 updateProfileAsync(UpdateProfileRequest request) {
return updateProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future updateProfileAsync(final UpdateProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateProfileResult call() throws Exception {
UpdateProfileResult result = null;
try {
result = executeUpdateProfile(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 updateTransformerAsync(UpdateTransformerRequest request) {
return updateTransformerAsync(request, null);
}
@Override
public java.util.concurrent.Future updateTransformerAsync(final UpdateTransformerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateTransformerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateTransformerResult call() throws Exception {
UpdateTransformerResult result = null;
try {
result = executeUpdateTransformer(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();
}
}