com.amazonaws.services.entityresolution.AWSEntityResolutionAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-entityresolution 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.entityresolution;
import javax.annotation.Generated;
import com.amazonaws.services.entityresolution.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing AWSEntityResolution 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 Entity Resolution API Reference.
*
*
* Entity Resolution is an Amazon Web Services service that provides pre-configured entity resolution capabilities that
* enable developers and analysts at advertising and marketing companies to build an accurate and complete view of their
* consumers.
*
*
* With Entity Resolution, you can match source records containing consumer identifiers, such as name, email address,
* and phone number. This is true even when these records have incomplete or conflicting identifiers. For example,
* Entity Resolution can effectively match a source record from a customer relationship management (CRM) system with a
* source record from a marketing system containing campaign information.
*
*
* To learn more about Entity Resolution concepts, procedures, and best practices, see the Entity Resolution User
* Guide.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSEntityResolutionAsyncClient extends AWSEntityResolutionClient implements AWSEntityResolutionAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSEntityResolutionAsyncClientBuilder asyncBuilder() {
return AWSEntityResolutionAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on AWSEntityResolution using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSEntityResolutionAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWSEntityResolution using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSEntityResolutionAsyncClient(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 addPolicyStatementAsync(AddPolicyStatementRequest request) {
return addPolicyStatementAsync(request, null);
}
@Override
public java.util.concurrent.Future addPolicyStatementAsync(final AddPolicyStatementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AddPolicyStatementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AddPolicyStatementResult call() throws Exception {
AddPolicyStatementResult result = null;
try {
result = executeAddPolicyStatement(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 batchDeleteUniqueIdAsync(BatchDeleteUniqueIdRequest request) {
return batchDeleteUniqueIdAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDeleteUniqueIdAsync(final BatchDeleteUniqueIdRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDeleteUniqueIdRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDeleteUniqueIdResult call() throws Exception {
BatchDeleteUniqueIdResult result = null;
try {
result = executeBatchDeleteUniqueId(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 createIdMappingWorkflowAsync(CreateIdMappingWorkflowRequest request) {
return createIdMappingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future createIdMappingWorkflowAsync(final CreateIdMappingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateIdMappingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateIdMappingWorkflowResult call() throws Exception {
CreateIdMappingWorkflowResult result = null;
try {
result = executeCreateIdMappingWorkflow(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 createIdNamespaceAsync(CreateIdNamespaceRequest request) {
return createIdNamespaceAsync(request, null);
}
@Override
public java.util.concurrent.Future createIdNamespaceAsync(final CreateIdNamespaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateIdNamespaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateIdNamespaceResult call() throws Exception {
CreateIdNamespaceResult result = null;
try {
result = executeCreateIdNamespace(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 createMatchingWorkflowAsync(CreateMatchingWorkflowRequest request) {
return createMatchingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future createMatchingWorkflowAsync(final CreateMatchingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateMatchingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateMatchingWorkflowResult call() throws Exception {
CreateMatchingWorkflowResult result = null;
try {
result = executeCreateMatchingWorkflow(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 createSchemaMappingAsync(CreateSchemaMappingRequest request) {
return createSchemaMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future createSchemaMappingAsync(final CreateSchemaMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateSchemaMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateSchemaMappingResult call() throws Exception {
CreateSchemaMappingResult result = null;
try {
result = executeCreateSchemaMapping(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 deleteIdMappingWorkflowAsync(DeleteIdMappingWorkflowRequest request) {
return deleteIdMappingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIdMappingWorkflowAsync(final DeleteIdMappingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIdMappingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIdMappingWorkflowResult call() throws Exception {
DeleteIdMappingWorkflowResult result = null;
try {
result = executeDeleteIdMappingWorkflow(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 deleteIdNamespaceAsync(DeleteIdNamespaceRequest request) {
return deleteIdNamespaceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIdNamespaceAsync(final DeleteIdNamespaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIdNamespaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIdNamespaceResult call() throws Exception {
DeleteIdNamespaceResult result = null;
try {
result = executeDeleteIdNamespace(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 deleteMatchingWorkflowAsync(DeleteMatchingWorkflowRequest request) {
return deleteMatchingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteMatchingWorkflowAsync(final DeleteMatchingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteMatchingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteMatchingWorkflowResult call() throws Exception {
DeleteMatchingWorkflowResult result = null;
try {
result = executeDeleteMatchingWorkflow(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 deletePolicyStatementAsync(DeletePolicyStatementRequest request) {
return deletePolicyStatementAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePolicyStatementAsync(final DeletePolicyStatementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePolicyStatementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePolicyStatementResult call() throws Exception {
DeletePolicyStatementResult result = null;
try {
result = executeDeletePolicyStatement(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 deleteSchemaMappingAsync(DeleteSchemaMappingRequest request) {
return deleteSchemaMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteSchemaMappingAsync(final DeleteSchemaMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteSchemaMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteSchemaMappingResult call() throws Exception {
DeleteSchemaMappingResult result = null;
try {
result = executeDeleteSchemaMapping(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 getIdMappingJobAsync(GetIdMappingJobRequest request) {
return getIdMappingJobAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdMappingJobAsync(final GetIdMappingJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdMappingJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdMappingJobResult call() throws Exception {
GetIdMappingJobResult result = null;
try {
result = executeGetIdMappingJob(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 getIdMappingWorkflowAsync(GetIdMappingWorkflowRequest request) {
return getIdMappingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdMappingWorkflowAsync(final GetIdMappingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdMappingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdMappingWorkflowResult call() throws Exception {
GetIdMappingWorkflowResult result = null;
try {
result = executeGetIdMappingWorkflow(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 getIdNamespaceAsync(GetIdNamespaceRequest request) {
return getIdNamespaceAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdNamespaceAsync(final GetIdNamespaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdNamespaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdNamespaceResult call() throws Exception {
GetIdNamespaceResult result = null;
try {
result = executeGetIdNamespace(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 getMatchIdAsync(GetMatchIdRequest request) {
return getMatchIdAsync(request, null);
}
@Override
public java.util.concurrent.Future getMatchIdAsync(final GetMatchIdRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMatchIdRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMatchIdResult call() throws Exception {
GetMatchIdResult result = null;
try {
result = executeGetMatchId(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 getMatchingJobAsync(GetMatchingJobRequest request) {
return getMatchingJobAsync(request, null);
}
@Override
public java.util.concurrent.Future getMatchingJobAsync(final GetMatchingJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMatchingJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMatchingJobResult call() throws Exception {
GetMatchingJobResult result = null;
try {
result = executeGetMatchingJob(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 getMatchingWorkflowAsync(GetMatchingWorkflowRequest request) {
return getMatchingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future getMatchingWorkflowAsync(final GetMatchingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMatchingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMatchingWorkflowResult call() throws Exception {
GetMatchingWorkflowResult result = null;
try {
result = executeGetMatchingWorkflow(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 getPolicyAsync(GetPolicyRequest request) {
return getPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getPolicyAsync(final GetPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetPolicyResult call() throws Exception {
GetPolicyResult result = null;
try {
result = executeGetPolicy(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 getSchemaMappingAsync(GetSchemaMappingRequest request) {
return getSchemaMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future getSchemaMappingAsync(final GetSchemaMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSchemaMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSchemaMappingResult call() throws Exception {
GetSchemaMappingResult result = null;
try {
result = executeGetSchemaMapping(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 listIdMappingJobsAsync(ListIdMappingJobsRequest request) {
return listIdMappingJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listIdMappingJobsAsync(final ListIdMappingJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIdMappingJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIdMappingJobsResult call() throws Exception {
ListIdMappingJobsResult result = null;
try {
result = executeListIdMappingJobs(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 listIdMappingWorkflowsAsync(ListIdMappingWorkflowsRequest request) {
return listIdMappingWorkflowsAsync(request, null);
}
@Override
public java.util.concurrent.Future listIdMappingWorkflowsAsync(final ListIdMappingWorkflowsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIdMappingWorkflowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIdMappingWorkflowsResult call() throws Exception {
ListIdMappingWorkflowsResult result = null;
try {
result = executeListIdMappingWorkflows(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 listIdNamespacesAsync(ListIdNamespacesRequest request) {
return listIdNamespacesAsync(request, null);
}
@Override
public java.util.concurrent.Future listIdNamespacesAsync(final ListIdNamespacesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIdNamespacesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIdNamespacesResult call() throws Exception {
ListIdNamespacesResult result = null;
try {
result = executeListIdNamespaces(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 listMatchingJobsAsync(ListMatchingJobsRequest request) {
return listMatchingJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listMatchingJobsAsync(final ListMatchingJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMatchingJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMatchingJobsResult call() throws Exception {
ListMatchingJobsResult result = null;
try {
result = executeListMatchingJobs(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 listMatchingWorkflowsAsync(ListMatchingWorkflowsRequest request) {
return listMatchingWorkflowsAsync(request, null);
}
@Override
public java.util.concurrent.Future listMatchingWorkflowsAsync(final ListMatchingWorkflowsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMatchingWorkflowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMatchingWorkflowsResult call() throws Exception {
ListMatchingWorkflowsResult result = null;
try {
result = executeListMatchingWorkflows(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 listProviderServicesAsync(ListProviderServicesRequest request) {
return listProviderServicesAsync(request, null);
}
@Override
public java.util.concurrent.Future listProviderServicesAsync(final ListProviderServicesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListProviderServicesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListProviderServicesResult call() throws Exception {
ListProviderServicesResult result = null;
try {
result = executeListProviderServices(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 listSchemaMappingsAsync(ListSchemaMappingsRequest request) {
return listSchemaMappingsAsync(request, null);
}
@Override
public java.util.concurrent.Future listSchemaMappingsAsync(final ListSchemaMappingsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSchemaMappingsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSchemaMappingsResult call() throws Exception {
ListSchemaMappingsResult result = null;
try {
result = executeListSchemaMappings(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 putPolicyAsync(PutPolicyRequest request) {
return putPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future putPolicyAsync(final PutPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutPolicyResult call() throws Exception {
PutPolicyResult result = null;
try {
result = executePutPolicy(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 startIdMappingJobAsync(StartIdMappingJobRequest request) {
return startIdMappingJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startIdMappingJobAsync(final StartIdMappingJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartIdMappingJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartIdMappingJobResult call() throws Exception {
StartIdMappingJobResult result = null;
try {
result = executeStartIdMappingJob(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 startMatchingJobAsync(StartMatchingJobRequest request) {
return startMatchingJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startMatchingJobAsync(final StartMatchingJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartMatchingJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartMatchingJobResult call() throws Exception {
StartMatchingJobResult result = null;
try {
result = executeStartMatchingJob(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 updateIdMappingWorkflowAsync(UpdateIdMappingWorkflowRequest request) {
return updateIdMappingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future updateIdMappingWorkflowAsync(final UpdateIdMappingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateIdMappingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateIdMappingWorkflowResult call() throws Exception {
UpdateIdMappingWorkflowResult result = null;
try {
result = executeUpdateIdMappingWorkflow(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 updateIdNamespaceAsync(UpdateIdNamespaceRequest request) {
return updateIdNamespaceAsync(request, null);
}
@Override
public java.util.concurrent.Future updateIdNamespaceAsync(final UpdateIdNamespaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateIdNamespaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateIdNamespaceResult call() throws Exception {
UpdateIdNamespaceResult result = null;
try {
result = executeUpdateIdNamespace(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 updateMatchingWorkflowAsync(UpdateMatchingWorkflowRequest request) {
return updateMatchingWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future updateMatchingWorkflowAsync(final UpdateMatchingWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateMatchingWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateMatchingWorkflowResult call() throws Exception {
UpdateMatchingWorkflowResult result = null;
try {
result = executeUpdateMatchingWorkflow(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 updateSchemaMappingAsync(UpdateSchemaMappingRequest request) {
return updateSchemaMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future updateSchemaMappingAsync(final UpdateSchemaMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateSchemaMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateSchemaMappingResult call() throws Exception {
UpdateSchemaMappingResult result = null;
try {
result = executeUpdateSchemaMapping(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();
}
}