com.amazonaws.services.kendra.AWSkendraAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-kendra Show documentation
Show all versions of aws-java-sdk-kendra Show documentation
The AWS Java SDK for AWSKendraFrontend module holds the client classes that are used for communicating with AWSKendraFrontend Service
/*
* 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.kendra;
import javax.annotation.Generated;
import com.amazonaws.services.kendra.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing kendra 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 Kendra is a service for indexing large document sets.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSkendraAsyncClient extends AWSkendraClient implements AWSkendraAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSkendraAsyncClientBuilder asyncBuilder() {
return AWSkendraAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on kendra using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSkendraAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on kendra using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSkendraAsyncClient(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 associateEntitiesToExperienceAsync(AssociateEntitiesToExperienceRequest request) {
return associateEntitiesToExperienceAsync(request, null);
}
@Override
public java.util.concurrent.Future associateEntitiesToExperienceAsync(
final AssociateEntitiesToExperienceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateEntitiesToExperienceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateEntitiesToExperienceResult call() throws Exception {
AssociateEntitiesToExperienceResult result = null;
try {
result = executeAssociateEntitiesToExperience(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 associatePersonasToEntitiesAsync(AssociatePersonasToEntitiesRequest request) {
return associatePersonasToEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future associatePersonasToEntitiesAsync(final AssociatePersonasToEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociatePersonasToEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociatePersonasToEntitiesResult call() throws Exception {
AssociatePersonasToEntitiesResult result = null;
try {
result = executeAssociatePersonasToEntities(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 batchDeleteDocumentAsync(BatchDeleteDocumentRequest request) {
return batchDeleteDocumentAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDeleteDocumentAsync(final BatchDeleteDocumentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDeleteDocumentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDeleteDocumentResult call() throws Exception {
BatchDeleteDocumentResult result = null;
try {
result = executeBatchDeleteDocument(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 batchDeleteFeaturedResultsSetAsync(BatchDeleteFeaturedResultsSetRequest request) {
return batchDeleteFeaturedResultsSetAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDeleteFeaturedResultsSetAsync(
final BatchDeleteFeaturedResultsSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDeleteFeaturedResultsSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDeleteFeaturedResultsSetResult call() throws Exception {
BatchDeleteFeaturedResultsSetResult result = null;
try {
result = executeBatchDeleteFeaturedResultsSet(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 batchGetDocumentStatusAsync(BatchGetDocumentStatusRequest request) {
return batchGetDocumentStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetDocumentStatusAsync(final BatchGetDocumentStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetDocumentStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetDocumentStatusResult call() throws Exception {
BatchGetDocumentStatusResult result = null;
try {
result = executeBatchGetDocumentStatus(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 batchPutDocumentAsync(BatchPutDocumentRequest request) {
return batchPutDocumentAsync(request, null);
}
@Override
public java.util.concurrent.Future batchPutDocumentAsync(final BatchPutDocumentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchPutDocumentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchPutDocumentResult call() throws Exception {
BatchPutDocumentResult result = null;
try {
result = executeBatchPutDocument(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 clearQuerySuggestionsAsync(ClearQuerySuggestionsRequest request) {
return clearQuerySuggestionsAsync(request, null);
}
@Override
public java.util.concurrent.Future clearQuerySuggestionsAsync(final ClearQuerySuggestionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ClearQuerySuggestionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ClearQuerySuggestionsResult call() throws Exception {
ClearQuerySuggestionsResult result = null;
try {
result = executeClearQuerySuggestions(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 createAccessControlConfigurationAsync(
CreateAccessControlConfigurationRequest request) {
return createAccessControlConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future createAccessControlConfigurationAsync(
final CreateAccessControlConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAccessControlConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAccessControlConfigurationResult call() throws Exception {
CreateAccessControlConfigurationResult result = null;
try {
result = executeCreateAccessControlConfiguration(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 createDataSourceAsync(CreateDataSourceRequest request) {
return createDataSourceAsync(request, null);
}
@Override
public java.util.concurrent.Future createDataSourceAsync(final CreateDataSourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDataSourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDataSourceResult call() throws Exception {
CreateDataSourceResult result = null;
try {
result = executeCreateDataSource(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 createExperienceAsync(CreateExperienceRequest request) {
return createExperienceAsync(request, null);
}
@Override
public java.util.concurrent.Future createExperienceAsync(final CreateExperienceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateExperienceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateExperienceResult call() throws Exception {
CreateExperienceResult result = null;
try {
result = executeCreateExperience(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 createFaqAsync(CreateFaqRequest request) {
return createFaqAsync(request, null);
}
@Override
public java.util.concurrent.Future createFaqAsync(final CreateFaqRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateFaqRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateFaqResult call() throws Exception {
CreateFaqResult result = null;
try {
result = executeCreateFaq(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 createFeaturedResultsSetAsync(CreateFeaturedResultsSetRequest request) {
return createFeaturedResultsSetAsync(request, null);
}
@Override
public java.util.concurrent.Future createFeaturedResultsSetAsync(final CreateFeaturedResultsSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateFeaturedResultsSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateFeaturedResultsSetResult call() throws Exception {
CreateFeaturedResultsSetResult result = null;
try {
result = executeCreateFeaturedResultsSet(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 createIndexAsync(CreateIndexRequest request) {
return createIndexAsync(request, null);
}
@Override
public java.util.concurrent.Future createIndexAsync(final CreateIndexRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateIndexRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateIndexResult call() throws Exception {
CreateIndexResult result = null;
try {
result = executeCreateIndex(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 createQuerySuggestionsBlockListAsync(
CreateQuerySuggestionsBlockListRequest request) {
return createQuerySuggestionsBlockListAsync(request, null);
}
@Override
public java.util.concurrent.Future createQuerySuggestionsBlockListAsync(
final CreateQuerySuggestionsBlockListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateQuerySuggestionsBlockListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateQuerySuggestionsBlockListResult call() throws Exception {
CreateQuerySuggestionsBlockListResult result = null;
try {
result = executeCreateQuerySuggestionsBlockList(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 createThesaurusAsync(CreateThesaurusRequest request) {
return createThesaurusAsync(request, null);
}
@Override
public java.util.concurrent.Future createThesaurusAsync(final CreateThesaurusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateThesaurusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateThesaurusResult call() throws Exception {
CreateThesaurusResult result = null;
try {
result = executeCreateThesaurus(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 deleteAccessControlConfigurationAsync(
DeleteAccessControlConfigurationRequest request) {
return deleteAccessControlConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAccessControlConfigurationAsync(
final DeleteAccessControlConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAccessControlConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAccessControlConfigurationResult call() throws Exception {
DeleteAccessControlConfigurationResult result = null;
try {
result = executeDeleteAccessControlConfiguration(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 deleteDataSourceAsync(DeleteDataSourceRequest request) {
return deleteDataSourceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDataSourceAsync(final DeleteDataSourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDataSourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDataSourceResult call() throws Exception {
DeleteDataSourceResult result = null;
try {
result = executeDeleteDataSource(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 deleteExperienceAsync(DeleteExperienceRequest request) {
return deleteExperienceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteExperienceAsync(final DeleteExperienceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteExperienceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteExperienceResult call() throws Exception {
DeleteExperienceResult result = null;
try {
result = executeDeleteExperience(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 deleteFaqAsync(DeleteFaqRequest request) {
return deleteFaqAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteFaqAsync(final DeleteFaqRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFaqRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFaqResult call() throws Exception {
DeleteFaqResult result = null;
try {
result = executeDeleteFaq(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 deleteIndexAsync(DeleteIndexRequest request) {
return deleteIndexAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteIndexAsync(final DeleteIndexRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteIndexRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteIndexResult call() throws Exception {
DeleteIndexResult result = null;
try {
result = executeDeleteIndex(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 deletePrincipalMappingAsync(DeletePrincipalMappingRequest request) {
return deletePrincipalMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePrincipalMappingAsync(final DeletePrincipalMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePrincipalMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePrincipalMappingResult call() throws Exception {
DeletePrincipalMappingResult result = null;
try {
result = executeDeletePrincipalMapping(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 deleteQuerySuggestionsBlockListAsync(
DeleteQuerySuggestionsBlockListRequest request) {
return deleteQuerySuggestionsBlockListAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteQuerySuggestionsBlockListAsync(
final DeleteQuerySuggestionsBlockListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteQuerySuggestionsBlockListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteQuerySuggestionsBlockListResult call() throws Exception {
DeleteQuerySuggestionsBlockListResult result = null;
try {
result = executeDeleteQuerySuggestionsBlockList(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 deleteThesaurusAsync(DeleteThesaurusRequest request) {
return deleteThesaurusAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteThesaurusAsync(final DeleteThesaurusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteThesaurusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteThesaurusResult call() throws Exception {
DeleteThesaurusResult result = null;
try {
result = executeDeleteThesaurus(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 describeAccessControlConfigurationAsync(
DescribeAccessControlConfigurationRequest request) {
return describeAccessControlConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAccessControlConfigurationAsync(
final DescribeAccessControlConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAccessControlConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAccessControlConfigurationResult call() throws Exception {
DescribeAccessControlConfigurationResult result = null;
try {
result = executeDescribeAccessControlConfiguration(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 describeDataSourceAsync(DescribeDataSourceRequest request) {
return describeDataSourceAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDataSourceAsync(final DescribeDataSourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDataSourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDataSourceResult call() throws Exception {
DescribeDataSourceResult result = null;
try {
result = executeDescribeDataSource(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 describeExperienceAsync(DescribeExperienceRequest request) {
return describeExperienceAsync(request, null);
}
@Override
public java.util.concurrent.Future describeExperienceAsync(final DescribeExperienceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeExperienceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeExperienceResult call() throws Exception {
DescribeExperienceResult result = null;
try {
result = executeDescribeExperience(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 describeFaqAsync(DescribeFaqRequest request) {
return describeFaqAsync(request, null);
}
@Override
public java.util.concurrent.Future describeFaqAsync(final DescribeFaqRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFaqRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFaqResult call() throws Exception {
DescribeFaqResult result = null;
try {
result = executeDescribeFaq(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 describeFeaturedResultsSetAsync(DescribeFeaturedResultsSetRequest request) {
return describeFeaturedResultsSetAsync(request, null);
}
@Override
public java.util.concurrent.Future describeFeaturedResultsSetAsync(final DescribeFeaturedResultsSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFeaturedResultsSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFeaturedResultsSetResult call() throws Exception {
DescribeFeaturedResultsSetResult result = null;
try {
result = executeDescribeFeaturedResultsSet(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 describeIndexAsync(DescribeIndexRequest request) {
return describeIndexAsync(request, null);
}
@Override
public java.util.concurrent.Future describeIndexAsync(final DescribeIndexRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeIndexRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeIndexResult call() throws Exception {
DescribeIndexResult result = null;
try {
result = executeDescribeIndex(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 describePrincipalMappingAsync(DescribePrincipalMappingRequest request) {
return describePrincipalMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future describePrincipalMappingAsync(final DescribePrincipalMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribePrincipalMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribePrincipalMappingResult call() throws Exception {
DescribePrincipalMappingResult result = null;
try {
result = executeDescribePrincipalMapping(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 describeQuerySuggestionsBlockListAsync(
DescribeQuerySuggestionsBlockListRequest request) {
return describeQuerySuggestionsBlockListAsync(request, null);
}
@Override
public java.util.concurrent.Future describeQuerySuggestionsBlockListAsync(
final DescribeQuerySuggestionsBlockListRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeQuerySuggestionsBlockListRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeQuerySuggestionsBlockListResult call() throws Exception {
DescribeQuerySuggestionsBlockListResult result = null;
try {
result = executeDescribeQuerySuggestionsBlockList(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 describeQuerySuggestionsConfigAsync(DescribeQuerySuggestionsConfigRequest request) {
return describeQuerySuggestionsConfigAsync(request, null);
}
@Override
public java.util.concurrent.Future describeQuerySuggestionsConfigAsync(
final DescribeQuerySuggestionsConfigRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeQuerySuggestionsConfigRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeQuerySuggestionsConfigResult call() throws Exception {
DescribeQuerySuggestionsConfigResult result = null;
try {
result = executeDescribeQuerySuggestionsConfig(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 describeThesaurusAsync(DescribeThesaurusRequest request) {
return describeThesaurusAsync(request, null);
}
@Override
public java.util.concurrent.Future describeThesaurusAsync(final DescribeThesaurusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeThesaurusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeThesaurusResult call() throws Exception {
DescribeThesaurusResult result = null;
try {
result = executeDescribeThesaurus(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 disassociateEntitiesFromExperienceAsync(
DisassociateEntitiesFromExperienceRequest request) {
return disassociateEntitiesFromExperienceAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateEntitiesFromExperienceAsync(
final DisassociateEntitiesFromExperienceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateEntitiesFromExperienceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateEntitiesFromExperienceResult call() throws Exception {
DisassociateEntitiesFromExperienceResult result = null;
try {
result = executeDisassociateEntitiesFromExperience(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 disassociatePersonasFromEntitiesAsync(
DisassociatePersonasFromEntitiesRequest request) {
return disassociatePersonasFromEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociatePersonasFromEntitiesAsync(
final DisassociatePersonasFromEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociatePersonasFromEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociatePersonasFromEntitiesResult call() throws Exception {
DisassociatePersonasFromEntitiesResult result = null;
try {
result = executeDisassociatePersonasFromEntities(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 getQuerySuggestionsAsync(GetQuerySuggestionsRequest request) {
return getQuerySuggestionsAsync(request, null);
}
@Override
public java.util.concurrent.Future getQuerySuggestionsAsync(final GetQuerySuggestionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetQuerySuggestionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetQuerySuggestionsResult call() throws Exception {
GetQuerySuggestionsResult result = null;
try {
result = executeGetQuerySuggestions(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 getSnapshotsAsync(GetSnapshotsRequest request) {
return getSnapshotsAsync(request, null);
}
@Override
public java.util.concurrent.Future getSnapshotsAsync(final GetSnapshotsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSnapshotsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSnapshotsResult call() throws Exception {
GetSnapshotsResult result = null;
try {
result = executeGetSnapshots(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 listAccessControlConfigurationsAsync(
ListAccessControlConfigurationsRequest request) {
return listAccessControlConfigurationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAccessControlConfigurationsAsync(
final ListAccessControlConfigurationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAccessControlConfigurationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAccessControlConfigurationsResult call() throws Exception {
ListAccessControlConfigurationsResult result = null;
try {
result = executeListAccessControlConfigurations(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 listDataSourceSyncJobsAsync(ListDataSourceSyncJobsRequest request) {
return listDataSourceSyncJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDataSourceSyncJobsAsync(final ListDataSourceSyncJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDataSourceSyncJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDataSourceSyncJobsResult call() throws Exception {
ListDataSourceSyncJobsResult result = null;
try {
result = executeListDataSourceSyncJobs(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 listDataSourcesAsync(ListDataSourcesRequest request) {
return listDataSourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future listDataSourcesAsync(final ListDataSourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDataSourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDataSourcesResult call() throws Exception {
ListDataSourcesResult result = null;
try {
result = executeListDataSources(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 listEntityPersonasAsync(ListEntityPersonasRequest request) {
return listEntityPersonasAsync(request, null);
}
@Override
public java.util.concurrent.Future listEntityPersonasAsync(final ListEntityPersonasRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEntityPersonasRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEntityPersonasResult call() throws Exception {
ListEntityPersonasResult result = null;
try {
result = executeListEntityPersonas(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 listExperienceEntitiesAsync(ListExperienceEntitiesRequest request) {
return listExperienceEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future listExperienceEntitiesAsync(final ListExperienceEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListExperienceEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListExperienceEntitiesResult call() throws Exception {
ListExperienceEntitiesResult result = null;
try {
result = executeListExperienceEntities(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 listExperiencesAsync(ListExperiencesRequest request) {
return listExperiencesAsync(request, null);
}
@Override
public java.util.concurrent.Future listExperiencesAsync(final ListExperiencesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListExperiencesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListExperiencesResult call() throws Exception {
ListExperiencesResult result = null;
try {
result = executeListExperiences(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 listFaqsAsync(ListFaqsRequest request) {
return listFaqsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFaqsAsync(final ListFaqsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFaqsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFaqsResult call() throws Exception {
ListFaqsResult result = null;
try {
result = executeListFaqs(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 listFeaturedResultsSetsAsync(ListFeaturedResultsSetsRequest request) {
return listFeaturedResultsSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFeaturedResultsSetsAsync(final ListFeaturedResultsSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFeaturedResultsSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFeaturedResultsSetsResult call() throws Exception {
ListFeaturedResultsSetsResult result = null;
try {
result = executeListFeaturedResultsSets(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 listGroupsOlderThanOrderingIdAsync(ListGroupsOlderThanOrderingIdRequest request) {
return listGroupsOlderThanOrderingIdAsync(request, null);
}
@Override
public java.util.concurrent.Future listGroupsOlderThanOrderingIdAsync(
final ListGroupsOlderThanOrderingIdRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListGroupsOlderThanOrderingIdRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListGroupsOlderThanOrderingIdResult call() throws Exception {
ListGroupsOlderThanOrderingIdResult result = null;
try {
result = executeListGroupsOlderThanOrderingId(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 listIndicesAsync(ListIndicesRequest request) {
return listIndicesAsync(request, null);
}
@Override
public java.util.concurrent.Future listIndicesAsync(final ListIndicesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListIndicesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListIndicesResult call() throws Exception {
ListIndicesResult result = null;
try {
result = executeListIndices(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 listQuerySuggestionsBlockListsAsync(ListQuerySuggestionsBlockListsRequest request) {
return listQuerySuggestionsBlockListsAsync(request, null);
}
@Override
public java.util.concurrent.Future listQuerySuggestionsBlockListsAsync(
final ListQuerySuggestionsBlockListsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListQuerySuggestionsBlockListsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListQuerySuggestionsBlockListsResult call() throws Exception {
ListQuerySuggestionsBlockListsResult result = null;
try {
result = executeListQuerySuggestionsBlockLists(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 listThesauriAsync(ListThesauriRequest request) {
return listThesauriAsync(request, null);
}
@Override
public java.util.concurrent.Future listThesauriAsync(final ListThesauriRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListThesauriRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListThesauriResult call() throws Exception {
ListThesauriResult result = null;
try {
result = executeListThesauri(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 putPrincipalMappingAsync(PutPrincipalMappingRequest request) {
return putPrincipalMappingAsync(request, null);
}
@Override
public java.util.concurrent.Future putPrincipalMappingAsync(final PutPrincipalMappingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutPrincipalMappingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutPrincipalMappingResult call() throws Exception {
PutPrincipalMappingResult result = null;
try {
result = executePutPrincipalMapping(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 queryAsync(QueryRequest request) {
return queryAsync(request, null);
}
@Override
public java.util.concurrent.Future queryAsync(final QueryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final QueryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public QueryResult call() throws Exception {
QueryResult result = null;
try {
result = executeQuery(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 retrieveAsync(RetrieveRequest request) {
return retrieveAsync(request, null);
}
@Override
public java.util.concurrent.Future retrieveAsync(final RetrieveRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RetrieveRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RetrieveResult call() throws Exception {
RetrieveResult result = null;
try {
result = executeRetrieve(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 startDataSourceSyncJobAsync(StartDataSourceSyncJobRequest request) {
return startDataSourceSyncJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startDataSourceSyncJobAsync(final StartDataSourceSyncJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartDataSourceSyncJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartDataSourceSyncJobResult call() throws Exception {
StartDataSourceSyncJobResult result = null;
try {
result = executeStartDataSourceSyncJob(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 stopDataSourceSyncJobAsync(StopDataSourceSyncJobRequest request) {
return stopDataSourceSyncJobAsync(request, null);
}
@Override
public java.util.concurrent.Future stopDataSourceSyncJobAsync(final StopDataSourceSyncJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopDataSourceSyncJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopDataSourceSyncJobResult call() throws Exception {
StopDataSourceSyncJobResult result = null;
try {
result = executeStopDataSourceSyncJob(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 submitFeedbackAsync(SubmitFeedbackRequest request) {
return submitFeedbackAsync(request, null);
}
@Override
public java.util.concurrent.Future submitFeedbackAsync(final SubmitFeedbackRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SubmitFeedbackRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SubmitFeedbackResult call() throws Exception {
SubmitFeedbackResult result = null;
try {
result = executeSubmitFeedback(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 updateAccessControlConfigurationAsync(
UpdateAccessControlConfigurationRequest request) {
return updateAccessControlConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future updateAccessControlConfigurationAsync(
final UpdateAccessControlConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateAccessControlConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateAccessControlConfigurationResult call() throws Exception {
UpdateAccessControlConfigurationResult result = null;
try {
result = executeUpdateAccessControlConfiguration(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 updateDataSourceAsync(UpdateDataSourceRequest request) {
return updateDataSourceAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDataSourceAsync(final UpdateDataSourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDataSourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDataSourceResult call() throws Exception {
UpdateDataSourceResult result = null;
try {
result = executeUpdateDataSource(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 updateExperienceAsync(UpdateExperienceRequest request) {
return updateExperienceAsync(request, null);
}
@Override
public java.util.concurrent.Future updateExperienceAsync(final UpdateExperienceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateExperienceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateExperienceResult call() throws Exception {
UpdateExperienceResult result = null;
try {
result = executeUpdateExperience(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 updateFeaturedResultsSetAsync(UpdateFeaturedResultsSetRequest request) {
return updateFeaturedResultsSetAsync(request, null);
}
@Override
public java.util.concurrent.Future updateFeaturedResultsSetAsync(final UpdateFeaturedResultsSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateFeaturedResultsSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateFeaturedResultsSetResult call() throws Exception {
UpdateFeaturedResultsSetResult result = null;
try {
result = executeUpdateFeaturedResultsSet(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 updateIndexAsync(UpdateIndexRequest request) {
return updateIndexAsync(request, null);
}
@Override
public java.util.concurrent.Future updateIndexAsync(final UpdateIndexRequest request,
final com.amazonaws.handlers.AsyncHandler