com.amazonaws.services.comprehend.AmazonComprehendAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-comprehend Show documentation
Show all versions of aws-java-sdk-comprehend Show documentation
The AWS Java SDK for Amazon Comprehend module holds the client classes that are used for communicating with Amazon Comprehend Service
/*
* Copyright 2017-2022 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.comprehend;
import javax.annotation.Generated;
import com.amazonaws.services.comprehend.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Amazon Comprehend 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 Comprehend is an AWS service for gaining insight into the content of documents. Use these actions to determine
* the topics contained in your documents, the topics they discuss, the predominant sentiment expressed in them, the
* predominant language used, and more.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonComprehendAsyncClient extends AmazonComprehendClient implements AmazonComprehendAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonComprehendAsyncClientBuilder asyncBuilder() {
return AmazonComprehendAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Comprehend using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonComprehendAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Comprehend using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonComprehendAsyncClient(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 batchDetectDominantLanguageAsync(BatchDetectDominantLanguageRequest request) {
return batchDetectDominantLanguageAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDetectDominantLanguageAsync(final BatchDetectDominantLanguageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDetectDominantLanguageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDetectDominantLanguageResult call() throws Exception {
BatchDetectDominantLanguageResult result = null;
try {
result = executeBatchDetectDominantLanguage(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 batchDetectEntitiesAsync(BatchDetectEntitiesRequest request) {
return batchDetectEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDetectEntitiesAsync(final BatchDetectEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDetectEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDetectEntitiesResult call() throws Exception {
BatchDetectEntitiesResult result = null;
try {
result = executeBatchDetectEntities(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 batchDetectKeyPhrasesAsync(BatchDetectKeyPhrasesRequest request) {
return batchDetectKeyPhrasesAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDetectKeyPhrasesAsync(final BatchDetectKeyPhrasesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDetectKeyPhrasesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDetectKeyPhrasesResult call() throws Exception {
BatchDetectKeyPhrasesResult result = null;
try {
result = executeBatchDetectKeyPhrases(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 batchDetectSentimentAsync(BatchDetectSentimentRequest request) {
return batchDetectSentimentAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDetectSentimentAsync(final BatchDetectSentimentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDetectSentimentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDetectSentimentResult call() throws Exception {
BatchDetectSentimentResult result = null;
try {
result = executeBatchDetectSentiment(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 batchDetectSyntaxAsync(BatchDetectSyntaxRequest request) {
return batchDetectSyntaxAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDetectSyntaxAsync(final BatchDetectSyntaxRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDetectSyntaxRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDetectSyntaxResult call() throws Exception {
BatchDetectSyntaxResult result = null;
try {
result = executeBatchDetectSyntax(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 classifyDocumentAsync(ClassifyDocumentRequest request) {
return classifyDocumentAsync(request, null);
}
@Override
public java.util.concurrent.Future classifyDocumentAsync(final ClassifyDocumentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ClassifyDocumentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ClassifyDocumentResult call() throws Exception {
ClassifyDocumentResult result = null;
try {
result = executeClassifyDocument(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 containsPiiEntitiesAsync(ContainsPiiEntitiesRequest request) {
return containsPiiEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future containsPiiEntitiesAsync(final ContainsPiiEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ContainsPiiEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ContainsPiiEntitiesResult call() throws Exception {
ContainsPiiEntitiesResult result = null;
try {
result = executeContainsPiiEntities(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 createDocumentClassifierAsync(CreateDocumentClassifierRequest request) {
return createDocumentClassifierAsync(request, null);
}
@Override
public java.util.concurrent.Future createDocumentClassifierAsync(final CreateDocumentClassifierRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDocumentClassifierRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDocumentClassifierResult call() throws Exception {
CreateDocumentClassifierResult result = null;
try {
result = executeCreateDocumentClassifier(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 createEndpointAsync(CreateEndpointRequest request) {
return createEndpointAsync(request, null);
}
@Override
public java.util.concurrent.Future createEndpointAsync(final CreateEndpointRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateEndpointRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateEndpointResult call() throws Exception {
CreateEndpointResult result = null;
try {
result = executeCreateEndpoint(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 createEntityRecognizerAsync(CreateEntityRecognizerRequest request) {
return createEntityRecognizerAsync(request, null);
}
@Override
public java.util.concurrent.Future createEntityRecognizerAsync(final CreateEntityRecognizerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateEntityRecognizerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateEntityRecognizerResult call() throws Exception {
CreateEntityRecognizerResult result = null;
try {
result = executeCreateEntityRecognizer(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 deleteDocumentClassifierAsync(DeleteDocumentClassifierRequest request) {
return deleteDocumentClassifierAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDocumentClassifierAsync(final DeleteDocumentClassifierRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDocumentClassifierRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDocumentClassifierResult call() throws Exception {
DeleteDocumentClassifierResult result = null;
try {
result = executeDeleteDocumentClassifier(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 deleteEndpointAsync(DeleteEndpointRequest request) {
return deleteEndpointAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteEndpointAsync(final DeleteEndpointRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteEndpointRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteEndpointResult call() throws Exception {
DeleteEndpointResult result = null;
try {
result = executeDeleteEndpoint(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 deleteEntityRecognizerAsync(DeleteEntityRecognizerRequest request) {
return deleteEntityRecognizerAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteEntityRecognizerAsync(final DeleteEntityRecognizerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteEntityRecognizerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteEntityRecognizerResult call() throws Exception {
DeleteEntityRecognizerResult result = null;
try {
result = executeDeleteEntityRecognizer(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 deleteResourcePolicyAsync(DeleteResourcePolicyRequest request) {
return deleteResourcePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteResourcePolicyAsync(final DeleteResourcePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteResourcePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteResourcePolicyResult call() throws Exception {
DeleteResourcePolicyResult result = null;
try {
result = executeDeleteResourcePolicy(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 describeDocumentClassificationJobAsync(
DescribeDocumentClassificationJobRequest request) {
return describeDocumentClassificationJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDocumentClassificationJobAsync(
final DescribeDocumentClassificationJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDocumentClassificationJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDocumentClassificationJobResult call() throws Exception {
DescribeDocumentClassificationJobResult result = null;
try {
result = executeDescribeDocumentClassificationJob(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 describeDocumentClassifierAsync(DescribeDocumentClassifierRequest request) {
return describeDocumentClassifierAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDocumentClassifierAsync(final DescribeDocumentClassifierRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDocumentClassifierRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDocumentClassifierResult call() throws Exception {
DescribeDocumentClassifierResult result = null;
try {
result = executeDescribeDocumentClassifier(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 describeDominantLanguageDetectionJobAsync(
DescribeDominantLanguageDetectionJobRequest request) {
return describeDominantLanguageDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDominantLanguageDetectionJobAsync(
final DescribeDominantLanguageDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDominantLanguageDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDominantLanguageDetectionJobResult call() throws Exception {
DescribeDominantLanguageDetectionJobResult result = null;
try {
result = executeDescribeDominantLanguageDetectionJob(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 describeEndpointAsync(DescribeEndpointRequest request) {
return describeEndpointAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEndpointAsync(final DescribeEndpointRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEndpointRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEndpointResult call() throws Exception {
DescribeEndpointResult result = null;
try {
result = executeDescribeEndpoint(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 describeEntitiesDetectionJobAsync(DescribeEntitiesDetectionJobRequest request) {
return describeEntitiesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEntitiesDetectionJobAsync(final DescribeEntitiesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEntitiesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEntitiesDetectionJobResult call() throws Exception {
DescribeEntitiesDetectionJobResult result = null;
try {
result = executeDescribeEntitiesDetectionJob(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 describeEntityRecognizerAsync(DescribeEntityRecognizerRequest request) {
return describeEntityRecognizerAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEntityRecognizerAsync(final DescribeEntityRecognizerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEntityRecognizerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEntityRecognizerResult call() throws Exception {
DescribeEntityRecognizerResult result = null;
try {
result = executeDescribeEntityRecognizer(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 describeEventsDetectionJobAsync(DescribeEventsDetectionJobRequest request) {
return describeEventsDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEventsDetectionJobAsync(final DescribeEventsDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEventsDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEventsDetectionJobResult call() throws Exception {
DescribeEventsDetectionJobResult result = null;
try {
result = executeDescribeEventsDetectionJob(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 describeKeyPhrasesDetectionJobAsync(DescribeKeyPhrasesDetectionJobRequest request) {
return describeKeyPhrasesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeKeyPhrasesDetectionJobAsync(
final DescribeKeyPhrasesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeKeyPhrasesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeKeyPhrasesDetectionJobResult call() throws Exception {
DescribeKeyPhrasesDetectionJobResult result = null;
try {
result = executeDescribeKeyPhrasesDetectionJob(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 describePiiEntitiesDetectionJobAsync(
DescribePiiEntitiesDetectionJobRequest request) {
return describePiiEntitiesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describePiiEntitiesDetectionJobAsync(
final DescribePiiEntitiesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribePiiEntitiesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribePiiEntitiesDetectionJobResult call() throws Exception {
DescribePiiEntitiesDetectionJobResult result = null;
try {
result = executeDescribePiiEntitiesDetectionJob(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 describeResourcePolicyAsync(DescribeResourcePolicyRequest request) {
return describeResourcePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future describeResourcePolicyAsync(final DescribeResourcePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeResourcePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeResourcePolicyResult call() throws Exception {
DescribeResourcePolicyResult result = null;
try {
result = executeDescribeResourcePolicy(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 describeSentimentDetectionJobAsync(DescribeSentimentDetectionJobRequest request) {
return describeSentimentDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeSentimentDetectionJobAsync(
final DescribeSentimentDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeSentimentDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeSentimentDetectionJobResult call() throws Exception {
DescribeSentimentDetectionJobResult result = null;
try {
result = executeDescribeSentimentDetectionJob(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 describeTargetedSentimentDetectionJobAsync(
DescribeTargetedSentimentDetectionJobRequest request) {
return describeTargetedSentimentDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTargetedSentimentDetectionJobAsync(
final DescribeTargetedSentimentDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTargetedSentimentDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTargetedSentimentDetectionJobResult call() throws Exception {
DescribeTargetedSentimentDetectionJobResult result = null;
try {
result = executeDescribeTargetedSentimentDetectionJob(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 describeTopicsDetectionJobAsync(DescribeTopicsDetectionJobRequest request) {
return describeTopicsDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTopicsDetectionJobAsync(final DescribeTopicsDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTopicsDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTopicsDetectionJobResult call() throws Exception {
DescribeTopicsDetectionJobResult result = null;
try {
result = executeDescribeTopicsDetectionJob(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 detectDominantLanguageAsync(DetectDominantLanguageRequest request) {
return detectDominantLanguageAsync(request, null);
}
@Override
public java.util.concurrent.Future detectDominantLanguageAsync(final DetectDominantLanguageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetectDominantLanguageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetectDominantLanguageResult call() throws Exception {
DetectDominantLanguageResult result = null;
try {
result = executeDetectDominantLanguage(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 detectEntitiesAsync(DetectEntitiesRequest request) {
return detectEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future detectEntitiesAsync(final DetectEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetectEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetectEntitiesResult call() throws Exception {
DetectEntitiesResult result = null;
try {
result = executeDetectEntities(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 detectKeyPhrasesAsync(DetectKeyPhrasesRequest request) {
return detectKeyPhrasesAsync(request, null);
}
@Override
public java.util.concurrent.Future detectKeyPhrasesAsync(final DetectKeyPhrasesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetectKeyPhrasesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetectKeyPhrasesResult call() throws Exception {
DetectKeyPhrasesResult result = null;
try {
result = executeDetectKeyPhrases(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 detectPiiEntitiesAsync(DetectPiiEntitiesRequest request) {
return detectPiiEntitiesAsync(request, null);
}
@Override
public java.util.concurrent.Future detectPiiEntitiesAsync(final DetectPiiEntitiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetectPiiEntitiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetectPiiEntitiesResult call() throws Exception {
DetectPiiEntitiesResult result = null;
try {
result = executeDetectPiiEntities(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 detectSentimentAsync(DetectSentimentRequest request) {
return detectSentimentAsync(request, null);
}
@Override
public java.util.concurrent.Future detectSentimentAsync(final DetectSentimentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetectSentimentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetectSentimentResult call() throws Exception {
DetectSentimentResult result = null;
try {
result = executeDetectSentiment(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 detectSyntaxAsync(DetectSyntaxRequest request) {
return detectSyntaxAsync(request, null);
}
@Override
public java.util.concurrent.Future detectSyntaxAsync(final DetectSyntaxRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DetectSyntaxRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DetectSyntaxResult call() throws Exception {
DetectSyntaxResult result = null;
try {
result = executeDetectSyntax(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 importModelAsync(ImportModelRequest request) {
return importModelAsync(request, null);
}
@Override
public java.util.concurrent.Future importModelAsync(final ImportModelRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ImportModelRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ImportModelResult call() throws Exception {
ImportModelResult result = null;
try {
result = executeImportModel(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 listDocumentClassificationJobsAsync(ListDocumentClassificationJobsRequest request) {
return listDocumentClassificationJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDocumentClassificationJobsAsync(
final ListDocumentClassificationJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDocumentClassificationJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDocumentClassificationJobsResult call() throws Exception {
ListDocumentClassificationJobsResult result = null;
try {
result = executeListDocumentClassificationJobs(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 listDocumentClassifierSummariesAsync(
ListDocumentClassifierSummariesRequest request) {
return listDocumentClassifierSummariesAsync(request, null);
}
@Override
public java.util.concurrent.Future listDocumentClassifierSummariesAsync(
final ListDocumentClassifierSummariesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDocumentClassifierSummariesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDocumentClassifierSummariesResult call() throws Exception {
ListDocumentClassifierSummariesResult result = null;
try {
result = executeListDocumentClassifierSummaries(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 listDocumentClassifiersAsync(ListDocumentClassifiersRequest request) {
return listDocumentClassifiersAsync(request, null);
}
@Override
public java.util.concurrent.Future listDocumentClassifiersAsync(final ListDocumentClassifiersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDocumentClassifiersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDocumentClassifiersResult call() throws Exception {
ListDocumentClassifiersResult result = null;
try {
result = executeListDocumentClassifiers(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 listDominantLanguageDetectionJobsAsync(
ListDominantLanguageDetectionJobsRequest request) {
return listDominantLanguageDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDominantLanguageDetectionJobsAsync(
final ListDominantLanguageDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDominantLanguageDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDominantLanguageDetectionJobsResult call() throws Exception {
ListDominantLanguageDetectionJobsResult result = null;
try {
result = executeListDominantLanguageDetectionJobs(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 listEndpointsAsync(ListEndpointsRequest request) {
return listEndpointsAsync(request, null);
}
@Override
public java.util.concurrent.Future listEndpointsAsync(final ListEndpointsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEndpointsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEndpointsResult call() throws Exception {
ListEndpointsResult result = null;
try {
result = executeListEndpoints(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 listEntitiesDetectionJobsAsync(ListEntitiesDetectionJobsRequest request) {
return listEntitiesDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listEntitiesDetectionJobsAsync(final ListEntitiesDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEntitiesDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEntitiesDetectionJobsResult call() throws Exception {
ListEntitiesDetectionJobsResult result = null;
try {
result = executeListEntitiesDetectionJobs(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 listEntityRecognizerSummariesAsync(ListEntityRecognizerSummariesRequest request) {
return listEntityRecognizerSummariesAsync(request, null);
}
@Override
public java.util.concurrent.Future listEntityRecognizerSummariesAsync(
final ListEntityRecognizerSummariesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEntityRecognizerSummariesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEntityRecognizerSummariesResult call() throws Exception {
ListEntityRecognizerSummariesResult result = null;
try {
result = executeListEntityRecognizerSummaries(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 listEntityRecognizersAsync(ListEntityRecognizersRequest request) {
return listEntityRecognizersAsync(request, null);
}
@Override
public java.util.concurrent.Future listEntityRecognizersAsync(final ListEntityRecognizersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEntityRecognizersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEntityRecognizersResult call() throws Exception {
ListEntityRecognizersResult result = null;
try {
result = executeListEntityRecognizers(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 listEventsDetectionJobsAsync(ListEventsDetectionJobsRequest request) {
return listEventsDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listEventsDetectionJobsAsync(final ListEventsDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEventsDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEventsDetectionJobsResult call() throws Exception {
ListEventsDetectionJobsResult result = null;
try {
result = executeListEventsDetectionJobs(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 listKeyPhrasesDetectionJobsAsync(ListKeyPhrasesDetectionJobsRequest request) {
return listKeyPhrasesDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listKeyPhrasesDetectionJobsAsync(final ListKeyPhrasesDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListKeyPhrasesDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListKeyPhrasesDetectionJobsResult call() throws Exception {
ListKeyPhrasesDetectionJobsResult result = null;
try {
result = executeListKeyPhrasesDetectionJobs(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 listPiiEntitiesDetectionJobsAsync(ListPiiEntitiesDetectionJobsRequest request) {
return listPiiEntitiesDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listPiiEntitiesDetectionJobsAsync(final ListPiiEntitiesDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPiiEntitiesDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPiiEntitiesDetectionJobsResult call() throws Exception {
ListPiiEntitiesDetectionJobsResult result = null;
try {
result = executeListPiiEntitiesDetectionJobs(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 listSentimentDetectionJobsAsync(ListSentimentDetectionJobsRequest request) {
return listSentimentDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listSentimentDetectionJobsAsync(final ListSentimentDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSentimentDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSentimentDetectionJobsResult call() throws Exception {
ListSentimentDetectionJobsResult result = null;
try {
result = executeListSentimentDetectionJobs(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 listTargetedSentimentDetectionJobsAsync(
ListTargetedSentimentDetectionJobsRequest request) {
return listTargetedSentimentDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listTargetedSentimentDetectionJobsAsync(
final ListTargetedSentimentDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTargetedSentimentDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTargetedSentimentDetectionJobsResult call() throws Exception {
ListTargetedSentimentDetectionJobsResult result = null;
try {
result = executeListTargetedSentimentDetectionJobs(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 listTopicsDetectionJobsAsync(ListTopicsDetectionJobsRequest request) {
return listTopicsDetectionJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listTopicsDetectionJobsAsync(final ListTopicsDetectionJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTopicsDetectionJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTopicsDetectionJobsResult call() throws Exception {
ListTopicsDetectionJobsResult result = null;
try {
result = executeListTopicsDetectionJobs(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 putResourcePolicyAsync(PutResourcePolicyRequest request) {
return putResourcePolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future putResourcePolicyAsync(final PutResourcePolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutResourcePolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutResourcePolicyResult call() throws Exception {
PutResourcePolicyResult result = null;
try {
result = executePutResourcePolicy(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 startDocumentClassificationJobAsync(StartDocumentClassificationJobRequest request) {
return startDocumentClassificationJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startDocumentClassificationJobAsync(
final StartDocumentClassificationJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartDocumentClassificationJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartDocumentClassificationJobResult call() throws Exception {
StartDocumentClassificationJobResult result = null;
try {
result = executeStartDocumentClassificationJob(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 startDominantLanguageDetectionJobAsync(
StartDominantLanguageDetectionJobRequest request) {
return startDominantLanguageDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startDominantLanguageDetectionJobAsync(
final StartDominantLanguageDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartDominantLanguageDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartDominantLanguageDetectionJobResult call() throws Exception {
StartDominantLanguageDetectionJobResult result = null;
try {
result = executeStartDominantLanguageDetectionJob(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 startEntitiesDetectionJobAsync(StartEntitiesDetectionJobRequest request) {
return startEntitiesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startEntitiesDetectionJobAsync(final StartEntitiesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartEntitiesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartEntitiesDetectionJobResult call() throws Exception {
StartEntitiesDetectionJobResult result = null;
try {
result = executeStartEntitiesDetectionJob(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 startEventsDetectionJobAsync(StartEventsDetectionJobRequest request) {
return startEventsDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startEventsDetectionJobAsync(final StartEventsDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartEventsDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartEventsDetectionJobResult call() throws Exception {
StartEventsDetectionJobResult result = null;
try {
result = executeStartEventsDetectionJob(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 startKeyPhrasesDetectionJobAsync(StartKeyPhrasesDetectionJobRequest request) {
return startKeyPhrasesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startKeyPhrasesDetectionJobAsync(final StartKeyPhrasesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartKeyPhrasesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartKeyPhrasesDetectionJobResult call() throws Exception {
StartKeyPhrasesDetectionJobResult result = null;
try {
result = executeStartKeyPhrasesDetectionJob(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 startPiiEntitiesDetectionJobAsync(StartPiiEntitiesDetectionJobRequest request) {
return startPiiEntitiesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startPiiEntitiesDetectionJobAsync(final StartPiiEntitiesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartPiiEntitiesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartPiiEntitiesDetectionJobResult call() throws Exception {
StartPiiEntitiesDetectionJobResult result = null;
try {
result = executeStartPiiEntitiesDetectionJob(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 startSentimentDetectionJobAsync(StartSentimentDetectionJobRequest request) {
return startSentimentDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startSentimentDetectionJobAsync(final StartSentimentDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartSentimentDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartSentimentDetectionJobResult call() throws Exception {
StartSentimentDetectionJobResult result = null;
try {
result = executeStartSentimentDetectionJob(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 startTargetedSentimentDetectionJobAsync(
StartTargetedSentimentDetectionJobRequest request) {
return startTargetedSentimentDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startTargetedSentimentDetectionJobAsync(
final StartTargetedSentimentDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartTargetedSentimentDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartTargetedSentimentDetectionJobResult call() throws Exception {
StartTargetedSentimentDetectionJobResult result = null;
try {
result = executeStartTargetedSentimentDetectionJob(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 startTopicsDetectionJobAsync(StartTopicsDetectionJobRequest request) {
return startTopicsDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startTopicsDetectionJobAsync(final StartTopicsDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartTopicsDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartTopicsDetectionJobResult call() throws Exception {
StartTopicsDetectionJobResult result = null;
try {
result = executeStartTopicsDetectionJob(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 stopDominantLanguageDetectionJobAsync(
StopDominantLanguageDetectionJobRequest request) {
return stopDominantLanguageDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future stopDominantLanguageDetectionJobAsync(
final StopDominantLanguageDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopDominantLanguageDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopDominantLanguageDetectionJobResult call() throws Exception {
StopDominantLanguageDetectionJobResult result = null;
try {
result = executeStopDominantLanguageDetectionJob(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 stopEntitiesDetectionJobAsync(StopEntitiesDetectionJobRequest request) {
return stopEntitiesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future stopEntitiesDetectionJobAsync(final StopEntitiesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopEntitiesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopEntitiesDetectionJobResult call() throws Exception {
StopEntitiesDetectionJobResult result = null;
try {
result = executeStopEntitiesDetectionJob(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 stopEventsDetectionJobAsync(StopEventsDetectionJobRequest request) {
return stopEventsDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future stopEventsDetectionJobAsync(final StopEventsDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopEventsDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopEventsDetectionJobResult call() throws Exception {
StopEventsDetectionJobResult result = null;
try {
result = executeStopEventsDetectionJob(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 stopKeyPhrasesDetectionJobAsync(StopKeyPhrasesDetectionJobRequest request) {
return stopKeyPhrasesDetectionJobAsync(request, null);
}
@Override
public java.util.concurrent.Future stopKeyPhrasesDetectionJobAsync(final StopKeyPhrasesDetectionJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopKeyPhrasesDetectionJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable