@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AmazonTranslateAsyncClient extends AmazonTranslateClient implements AmazonTranslateAsync
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
Provides translation of the input content from the source language to the target language.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
builder, createParallelData, deleteParallelData, deleteTerminology, describeTextTranslationJob, getCachedResponseMetadata, getParallelData, getTerminology, importTerminology, listLanguages, listParallelData, listTagsForResource, listTerminologies, listTextTranslationJobs, startTextTranslationJob, stopTextTranslationJob, tagResource, translateDocument, translateText, untagResource, updateParallelData
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createParallelData, deleteParallelData, deleteTerminology, describeTextTranslationJob, getCachedResponseMetadata, getParallelData, getTerminology, importTerminology, listLanguages, listParallelData, listTagsForResource, listTerminologies, listTextTranslationJobs, startTextTranslationJob, stopTextTranslationJob, tagResource, translateDocument, translateText, untagResource, updateParallelData
public static AmazonTranslateAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<CreateParallelDataResult> createParallelDataAsync(CreateParallelDataRequest request)
AmazonTranslateAsync
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
createParallelDataAsync
in interface AmazonTranslateAsync
public Future<CreateParallelDataResult> createParallelDataAsync(CreateParallelDataRequest request, AsyncHandler<CreateParallelDataRequest,CreateParallelDataResult> asyncHandler)
AmazonTranslateAsync
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
createParallelDataAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DeleteParallelDataResult> deleteParallelDataAsync(DeleteParallelDataRequest request)
AmazonTranslateAsync
Deletes a parallel data resource in Amazon Translate.
deleteParallelDataAsync
in interface AmazonTranslateAsync
public Future<DeleteParallelDataResult> deleteParallelDataAsync(DeleteParallelDataRequest request, AsyncHandler<DeleteParallelDataRequest,DeleteParallelDataResult> asyncHandler)
AmazonTranslateAsync
Deletes a parallel data resource in Amazon Translate.
deleteParallelDataAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DeleteTerminologyResult> deleteTerminologyAsync(DeleteTerminologyRequest request)
AmazonTranslateAsync
A synchronous action that deletes a custom terminology.
deleteTerminologyAsync
in interface AmazonTranslateAsync
public Future<DeleteTerminologyResult> deleteTerminologyAsync(DeleteTerminologyRequest request, AsyncHandler<DeleteTerminologyRequest,DeleteTerminologyResult> asyncHandler)
AmazonTranslateAsync
A synchronous action that deletes a custom terminology.
deleteTerminologyAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DescribeTextTranslationJobResult> describeTextTranslationJobAsync(DescribeTextTranslationJobRequest request)
AmazonTranslateAsync
Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
describeTextTranslationJobAsync
in interface AmazonTranslateAsync
public Future<DescribeTextTranslationJobResult> describeTextTranslationJobAsync(DescribeTextTranslationJobRequest request, AsyncHandler<DescribeTextTranslationJobRequest,DescribeTextTranslationJobResult> asyncHandler)
AmazonTranslateAsync
Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
describeTextTranslationJobAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetParallelDataResult> getParallelDataAsync(GetParallelDataRequest request)
AmazonTranslateAsync
Provides information about a parallel data resource.
getParallelDataAsync
in interface AmazonTranslateAsync
public Future<GetParallelDataResult> getParallelDataAsync(GetParallelDataRequest request, AsyncHandler<GetParallelDataRequest,GetParallelDataResult> asyncHandler)
AmazonTranslateAsync
Provides information about a parallel data resource.
getParallelDataAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetTerminologyResult> getTerminologyAsync(GetTerminologyRequest request)
AmazonTranslateAsync
Retrieves a custom terminology.
getTerminologyAsync
in interface AmazonTranslateAsync
public Future<GetTerminologyResult> getTerminologyAsync(GetTerminologyRequest request, AsyncHandler<GetTerminologyRequest,GetTerminologyResult> asyncHandler)
AmazonTranslateAsync
Retrieves a custom terminology.
getTerminologyAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ImportTerminologyResult> importTerminologyAsync(ImportTerminologyRequest request)
AmazonTranslateAsync
Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
importTerminologyAsync
in interface AmazonTranslateAsync
public Future<ImportTerminologyResult> importTerminologyAsync(ImportTerminologyRequest request, AsyncHandler<ImportTerminologyRequest,ImportTerminologyResult> asyncHandler)
AmazonTranslateAsync
Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
importTerminologyAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListLanguagesResult> listLanguagesAsync(ListLanguagesRequest request)
AmazonTranslateAsync
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
listLanguagesAsync
in interface AmazonTranslateAsync
public Future<ListLanguagesResult> listLanguagesAsync(ListLanguagesRequest request, AsyncHandler<ListLanguagesRequest,ListLanguagesResult> asyncHandler)
AmazonTranslateAsync
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
listLanguagesAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListParallelDataResult> listParallelDataAsync(ListParallelDataRequest request)
AmazonTranslateAsync
Provides a list of your parallel data resources in Amazon Translate.
listParallelDataAsync
in interface AmazonTranslateAsync
public Future<ListParallelDataResult> listParallelDataAsync(ListParallelDataRequest request, AsyncHandler<ListParallelDataRequest,ListParallelDataResult> asyncHandler)
AmazonTranslateAsync
Provides a list of your parallel data resources in Amazon Translate.
listParallelDataAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request)
AmazonTranslateAsync
Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
listTagsForResourceAsync
in interface AmazonTranslateAsync
public Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request, AsyncHandler<ListTagsForResourceRequest,ListTagsForResourceResult> asyncHandler)
AmazonTranslateAsync
Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
listTagsForResourceAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListTerminologiesResult> listTerminologiesAsync(ListTerminologiesRequest request)
AmazonTranslateAsync
Provides a list of custom terminologies associated with your account.
listTerminologiesAsync
in interface AmazonTranslateAsync
public Future<ListTerminologiesResult> listTerminologiesAsync(ListTerminologiesRequest request, AsyncHandler<ListTerminologiesRequest,ListTerminologiesResult> asyncHandler)
AmazonTranslateAsync
Provides a list of custom terminologies associated with your account.
listTerminologiesAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListTextTranslationJobsResult> listTextTranslationJobsAsync(ListTextTranslationJobsRequest request)
AmazonTranslateAsync
Gets a list of the batch translation jobs that you have submitted.
listTextTranslationJobsAsync
in interface AmazonTranslateAsync
public Future<ListTextTranslationJobsResult> listTextTranslationJobsAsync(ListTextTranslationJobsRequest request, AsyncHandler<ListTextTranslationJobsRequest,ListTextTranslationJobsResult> asyncHandler)
AmazonTranslateAsync
Gets a list of the batch translation jobs that you have submitted.
listTextTranslationJobsAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<StartTextTranslationJobResult> startTextTranslationJobAsync(StartTextTranslationJobRequest request)
AmazonTranslateAsync
Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text
across multiple documents at once. For batch translation, you can input documents with different source languages
(specify auto
as the source language). You can specify one or more target languages. Batch
translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.
Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
startTextTranslationJobAsync
in interface AmazonTranslateAsync
public Future<StartTextTranslationJobResult> startTextTranslationJobAsync(StartTextTranslationJobRequest request, AsyncHandler<StartTextTranslationJobRequest,StartTextTranslationJobResult> asyncHandler)
AmazonTranslateAsync
Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text
across multiple documents at once. For batch translation, you can input documents with different source languages
(specify auto
as the source language). You can specify one or more target languages. Batch
translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.
Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
startTextTranslationJobAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<StopTextTranslationJobResult> stopTextTranslationJobAsync(StopTextTranslationJobRequest request)
AmazonTranslateAsync
Stops an asynchronous batch translation job that is in progress.
If the job's state is IN_PROGRESS
, the job will be marked for termination and put into the
STOP_REQUESTED
state. If the job completes before it can be stopped, it is put into the
COMPLETED
state. Otherwise, the job is put into the STOPPED
state.
Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use
the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation
job's JobId
.
stopTextTranslationJobAsync
in interface AmazonTranslateAsync
public Future<StopTextTranslationJobResult> stopTextTranslationJobAsync(StopTextTranslationJobRequest request, AsyncHandler<StopTextTranslationJobRequest,StopTextTranslationJobResult> asyncHandler)
AmazonTranslateAsync
Stops an asynchronous batch translation job that is in progress.
If the job's state is IN_PROGRESS
, the job will be marked for termination and put into the
STOP_REQUESTED
state. If the job completes before it can be stopped, it is put into the
COMPLETED
state. Otherwise, the job is put into the STOPPED
state.
Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use
the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation
job's JobId
.
stopTextTranslationJobAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<TagResourceResult> tagResourceAsync(TagResourceRequest request)
AmazonTranslateAsync
Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.
tagResourceAsync
in interface AmazonTranslateAsync
public Future<TagResourceResult> tagResourceAsync(TagResourceRequest request, AsyncHandler<TagResourceRequest,TagResourceResult> asyncHandler)
AmazonTranslateAsync
Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.
tagResourceAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<TranslateDocumentResult> translateDocumentAsync(TranslateDocumentRequest request)
AmazonTranslateAsync
Translates the input document from the source language to the target language. This synchronous operation
supports text, HTML, or Word documents as the input document. TranslateDocument
supports
translations from English to any supported language, and from any supported language to English. Therefore,
specify either the source language code or the target language code as “en” (English).
If you set the Formality
parameter, the request will fail if the target language does not support
formality. For a list of target languages that support formality, see Setting
formality.
translateDocumentAsync
in interface AmazonTranslateAsync
public Future<TranslateDocumentResult> translateDocumentAsync(TranslateDocumentRequest request, AsyncHandler<TranslateDocumentRequest,TranslateDocumentResult> asyncHandler)
AmazonTranslateAsync
Translates the input document from the source language to the target language. This synchronous operation
supports text, HTML, or Word documents as the input document. TranslateDocument
supports
translations from English to any supported language, and from any supported language to English. Therefore,
specify either the source language code or the target language code as “en” (English).
If you set the Formality
parameter, the request will fail if the target language does not support
formality. For a list of target languages that support formality, see Setting
formality.
translateDocumentAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<TranslateTextResult> translateTextAsync(TranslateTextRequest request)
AmazonTranslateAsync
Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.
translateTextAsync
in interface AmazonTranslateAsync
public Future<TranslateTextResult> translateTextAsync(TranslateTextRequest request, AsyncHandler<TranslateTextRequest,TranslateTextResult> asyncHandler)
AmazonTranslateAsync
Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.
translateTextAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request)
AmazonTranslateAsync
Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
untagResourceAsync
in interface AmazonTranslateAsync
public Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request, AsyncHandler<UntagResourceRequest,UntagResourceResult> asyncHandler)
AmazonTranslateAsync
Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
untagResourceAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<UpdateParallelDataResult> updateParallelDataAsync(UpdateParallelDataRequest request)
AmazonTranslateAsync
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
updateParallelDataAsync
in interface AmazonTranslateAsync
public Future<UpdateParallelDataResult> updateParallelDataAsync(UpdateParallelDataRequest request, AsyncHandler<UpdateParallelDataRequest,UpdateParallelDataResult> asyncHandler)
AmazonTranslateAsync
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
updateParallelDataAsync
in interface AmazonTranslateAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public void shutdown()
getExecutorService().shutdown()
followed by getExecutorService().awaitTermination()
prior to
calling this method.shutdown
in interface AmazonTranslate
shutdown
in class AmazonTranslateClient