com.amazonaws.services.customerprofiles.AmazonCustomerProfilesAsyncClient Maven / Gradle / Ivy
/*
* Copyright 2018-2023 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.customerprofiles;
import javax.annotation.Generated;
import com.amazonaws.services.customerprofiles.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Customer Profiles 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.
*
* Amazon Connect Customer Profiles
*
* Amazon Connect Customer Profiles is a unified customer profile for your contact center that has pre-built connectors
* powered by AppFlow that make it easy to combine customer information from third party applications, such as
* Salesforce (CRM), ServiceNow (ITSM), and your enterprise resource planning (ERP), with contact history from your
* Amazon Connect contact center. If you're new to Amazon Connect, you might find it helpful to review the Amazon Connect Administrator Guide.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonCustomerProfilesAsyncClient extends AmazonCustomerProfilesClient implements AmazonCustomerProfilesAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonCustomerProfilesAsyncClientBuilder asyncBuilder() {
return AmazonCustomerProfilesAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Customer Profiles using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonCustomerProfilesAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Customer Profiles using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonCustomerProfilesAsyncClient(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 addProfileKeyAsync(AddProfileKeyRequest request) {
return addProfileKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future addProfileKeyAsync(final AddProfileKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AddProfileKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AddProfileKeyResult call() throws Exception {
AddProfileKeyResult result = null;
try {
result = executeAddProfileKey(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 createDomainAsync(CreateDomainRequest request) {
return createDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future createDomainAsync(final CreateDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDomainResult call() throws Exception {
CreateDomainResult result = null;
try {
result = executeCreateDomain(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 createIntegrationWorkflowAsync(CreateIntegrationWorkflowRequest request) {
return createIntegrationWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future createIntegrationWorkflowAsync(final CreateIntegrationWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateIntegrationWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateIntegrationWorkflowResult call() throws Exception {
CreateIntegrationWorkflowResult result = null;
try {
result = executeCreateIntegrationWorkflow(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 deleteDomainAsync(DeleteDomainRequest request) {
return deleteDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDomainAsync(final DeleteDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDomainResult call() throws Exception {
DeleteDomainResult result = null;
try {
result = executeDeleteDomain(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 deleteIntegrationAsync(DeleteIntegrationRequest request) {
return deleteIntegrationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIntegrationAsync(final DeleteIntegrationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIntegrationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIntegrationResult call() throws Exception {
DeleteIntegrationResult result = null;
try {
result = executeDeleteIntegration(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 deleteProfileKeyAsync(DeleteProfileKeyRequest request) {
return deleteProfileKeyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteProfileKeyAsync(final DeleteProfileKeyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteProfileKeyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteProfileKeyResult call() throws Exception {
DeleteProfileKeyResult result = null;
try {
result = executeDeleteProfileKey(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 deleteProfileObjectAsync(DeleteProfileObjectRequest request) {
return deleteProfileObjectAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteProfileObjectAsync(final DeleteProfileObjectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteProfileObjectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteProfileObjectResult call() throws Exception {
DeleteProfileObjectResult result = null;
try {
result = executeDeleteProfileObject(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 deleteProfileObjectTypeAsync(DeleteProfileObjectTypeRequest request) {
return deleteProfileObjectTypeAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteProfileObjectTypeAsync(final DeleteProfileObjectTypeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteProfileObjectTypeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteProfileObjectTypeResult call() throws Exception {
DeleteProfileObjectTypeResult result = null;
try {
result = executeDeleteProfileObjectType(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 deleteWorkflowAsync(DeleteWorkflowRequest request) {
return deleteWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteWorkflowAsync(final DeleteWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteWorkflowResult call() throws Exception {
DeleteWorkflowResult result = null;
try {
result = executeDeleteWorkflow(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 getAutoMergingPreviewAsync(GetAutoMergingPreviewRequest request) {
return getAutoMergingPreviewAsync(request, null);
}
@Override
public java.util.concurrent.Future getAutoMergingPreviewAsync(final GetAutoMergingPreviewRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAutoMergingPreviewRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAutoMergingPreviewResult call() throws Exception {
GetAutoMergingPreviewResult result = null;
try {
result = executeGetAutoMergingPreview(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 getDomainAsync(GetDomainRequest request) {
return getDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future getDomainAsync(final GetDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDomainResult call() throws Exception {
GetDomainResult result = null;
try {
result = executeGetDomain(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 getIdentityResolutionJobAsync(GetIdentityResolutionJobRequest request) {
return getIdentityResolutionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future getIdentityResolutionJobAsync(final GetIdentityResolutionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIdentityResolutionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIdentityResolutionJobResult call() throws Exception {
GetIdentityResolutionJobResult result = null;
try {
result = executeGetIdentityResolutionJob(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 getIntegrationAsync(GetIntegrationRequest request) {
return getIntegrationAsync(request, null);
}
@Override
public java.util.concurrent.Future getIntegrationAsync(final GetIntegrationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetIntegrationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetIntegrationResult call() throws Exception {
GetIntegrationResult result = null;
try {
result = executeGetIntegration(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 getMatchesAsync(GetMatchesRequest request) {
return getMatchesAsync(request, null);
}
@Override
public java.util.concurrent.Future getMatchesAsync(final GetMatchesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMatchesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMatchesResult call() throws Exception {
GetMatchesResult result = null;
try {
result = executeGetMatches(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 getProfileObjectTypeAsync(GetProfileObjectTypeRequest request) {
return getProfileObjectTypeAsync(request, null);
}
@Override
public java.util.concurrent.Future getProfileObjectTypeAsync(final GetProfileObjectTypeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetProfileObjectTypeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetProfileObjectTypeResult call() throws Exception {
GetProfileObjectTypeResult result = null;
try {
result = executeGetProfileObjectType(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 getProfileObjectTypeTemplateAsync(GetProfileObjectTypeTemplateRequest request) {
return getProfileObjectTypeTemplateAsync(request, null);
}
@Override
public java.util.concurrent.Future getProfileObjectTypeTemplateAsync(final GetProfileObjectTypeTemplateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetProfileObjectTypeTemplateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetProfileObjectTypeTemplateResult call() throws Exception {
GetProfileObjectTypeTemplateResult result = null;
try {
result = executeGetProfileObjectTypeTemplate(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 getWorkflowAsync(GetWorkflowRequest request) {
return getWorkflowAsync(request, null);
}
@Override
public java.util.concurrent.Future getWorkflowAsync(final GetWorkflowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetWorkflowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetWorkflowResult call() throws Exception {
GetWorkflowResult result = null;
try {
result = executeGetWorkflow(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 getWorkflowStepsAsync(GetWorkflowStepsRequest request) {
return getWorkflowStepsAsync(request, null);
}
@Override
public java.util.concurrent.Future getWorkflowStepsAsync(final GetWorkflowStepsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetWorkflowStepsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetWorkflowStepsResult call() throws Exception {
GetWorkflowStepsResult result = null;
try {
result = executeGetWorkflowSteps(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 listAccountIntegrationsAsync(ListAccountIntegrationsRequest request) {
return listAccountIntegrationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAccountIntegrationsAsync(final ListAccountIntegrationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAccountIntegrationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAccountIntegrationsResult call() throws Exception {
ListAccountIntegrationsResult result = null;
try {
result = executeListAccountIntegrations(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 listDomainsAsync(ListDomainsRequest request) {
return listDomainsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDomainsAsync(final ListDomainsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDomainsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDomainsResult call() throws Exception {
ListDomainsResult result = null;
try {
result = executeListDomains(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 listIdentityResolutionJobsAsync(ListIdentityResolutionJobsRequest request) {
return listIdentityResolutionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listIdentityResolutionJobsAsync(final ListIdentityResolutionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIdentityResolutionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIdentityResolutionJobsResult call() throws Exception {
ListIdentityResolutionJobsResult result = null;
try {
result = executeListIdentityResolutionJobs(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 listIntegrationsAsync(ListIntegrationsRequest request) {
return listIntegrationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listIntegrationsAsync(final ListIntegrationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIntegrationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIntegrationsResult call() throws Exception {
ListIntegrationsResult result = null;
try {
result = executeListIntegrations(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 listProfileObjectTypeTemplatesAsync(ListProfileObjectTypeTemplatesRequest request) {
return listProfileObjectTypeTemplatesAsync(request, null);
}
@Override
public java.util.concurrent.Future listProfileObjectTypeTemplatesAsync(
final ListProfileObjectTypeTemplatesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListProfileObjectTypeTemplatesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListProfileObjectTypeTemplatesResult call() throws Exception {
ListProfileObjectTypeTemplatesResult result = null;
try {
result = executeListProfileObjectTypeTemplates(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 listProfileObjectTypesAsync(ListProfileObjectTypesRequest request) {
return listProfileObjectTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future listProfileObjectTypesAsync(final ListProfileObjectTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListProfileObjectTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListProfileObjectTypesResult call() throws Exception {
ListProfileObjectTypesResult result = null;
try {
result = executeListProfileObjectTypes(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 listProfileObjectsAsync(ListProfileObjectsRequest request) {
return listProfileObjectsAsync(request, null);
}
@Override
public java.util.concurrent.Future listProfileObjectsAsync(final ListProfileObjectsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListProfileObjectsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListProfileObjectsResult call() throws Exception {
ListProfileObjectsResult result = null;
try {
result = executeListProfileObjects(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 listWorkflowsAsync(ListWorkflowsRequest request) {
return listWorkflowsAsync(request, null);
}
@Override
public java.util.concurrent.Future listWorkflowsAsync(final ListWorkflowsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListWorkflowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListWorkflowsResult call() throws Exception {
ListWorkflowsResult result = null;
try {
result = executeListWorkflows(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 mergeProfilesAsync(MergeProfilesRequest request) {
return mergeProfilesAsync(request, null);
}
@Override
public java.util.concurrent.Future mergeProfilesAsync(final MergeProfilesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final MergeProfilesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public MergeProfilesResult call() throws Exception {
MergeProfilesResult result = null;
try {
result = executeMergeProfiles(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 putIntegrationAsync(PutIntegrationRequest request) {
return putIntegrationAsync(request, null);
}
@Override
public java.util.concurrent.Future putIntegrationAsync(final PutIntegrationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutIntegrationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutIntegrationResult call() throws Exception {
PutIntegrationResult result = null;
try {
result = executePutIntegration(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 putProfileObjectAsync(PutProfileObjectRequest request) {
return putProfileObjectAsync(request, null);
}
@Override
public java.util.concurrent.Future putProfileObjectAsync(final PutProfileObjectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutProfileObjectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutProfileObjectResult call() throws Exception {
PutProfileObjectResult result = null;
try {
result = executePutProfileObject(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 putProfileObjectTypeAsync(PutProfileObjectTypeRequest request) {
return putProfileObjectTypeAsync(request, null);
}
@Override
public java.util.concurrent.Future putProfileObjectTypeAsync(final PutProfileObjectTypeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutProfileObjectTypeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutProfileObjectTypeResult call() throws Exception {
PutProfileObjectTypeResult result = null;
try {
result = executePutProfileObjectType(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 searchProfilesAsync(SearchProfilesRequest request) {
return searchProfilesAsync(request, null);
}
@Override
public java.util.concurrent.Future searchProfilesAsync(final SearchProfilesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SearchProfilesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SearchProfilesResult call() throws Exception {
SearchProfilesResult result = null;
try {
result = executeSearchProfiles(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 updateDomainAsync(UpdateDomainRequest request) {
return updateDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDomainAsync(final UpdateDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDomainResult call() throws Exception {
UpdateDomainResult result = null;
try {
result = executeUpdateDomain(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;
}
});
}
/**
* 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