@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 between one source language and another of the same set of languages.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
static AmazonTranslateAsyncClientBuilder |
asyncBuilder() |
Future<DeleteTerminologyResult> |
deleteTerminologyAsync(DeleteTerminologyRequest request)
A synchronous action that deletes a custom terminology.
|
Future<DeleteTerminologyResult> |
deleteTerminologyAsync(DeleteTerminologyRequest request,
AsyncHandler<DeleteTerminologyRequest,DeleteTerminologyResult> asyncHandler)
A synchronous action that deletes a custom terminology.
|
ExecutorService |
getExecutorService()
Returns the executor service used by this client to execute async requests.
|
Future<GetTerminologyResult> |
getTerminologyAsync(GetTerminologyRequest request)
Retrieves a custom terminology.
|
Future<GetTerminologyResult> |
getTerminologyAsync(GetTerminologyRequest request,
AsyncHandler<GetTerminologyRequest,GetTerminologyResult> asyncHandler)
Retrieves a custom terminology.
|
Future<ImportTerminologyResult> |
importTerminologyAsync(ImportTerminologyRequest request)
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology
name.
|
Future<ImportTerminologyResult> |
importTerminologyAsync(ImportTerminologyRequest request,
AsyncHandler<ImportTerminologyRequest,ImportTerminologyResult> asyncHandler)
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology
name.
|
Future<ListTerminologiesResult> |
listTerminologiesAsync(ListTerminologiesRequest request)
Provides a list of custom terminologies associated with your account.
|
Future<ListTerminologiesResult> |
listTerminologiesAsync(ListTerminologiesRequest request,
AsyncHandler<ListTerminologiesRequest,ListTerminologiesResult> asyncHandler)
Provides a list of custom terminologies associated with your account.
|
void |
shutdown()
Shuts down the client, releasing all managed resources.
|
Future<TranslateTextResult> |
translateTextAsync(TranslateTextRequest request)
Translates input text from the source language to the target language.
|
Future<TranslateTextResult> |
translateTextAsync(TranslateTextRequest request,
AsyncHandler<TranslateTextRequest,TranslateTextResult> asyncHandler)
Translates input text from the source language to the target language.
|
builder, deleteTerminology, getCachedResponseMetadata, getTerminology, importTerminology, listTerminologies, translateText
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
deleteTerminology, getCachedResponseMetadata, getTerminology, importTerminology, listTerminologies, translateText
public static AmazonTranslateAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
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<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 or not 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. Currently, the only supported merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology take up to 10 minutes to fully propagate and be available for use in a translation due to cache policies with the DataPlane service that performs the translations.
importTerminologyAsync
in interface AmazonTranslateAsync
public Future<ImportTerminologyResult> importTerminologyAsync(ImportTerminologyRequest request, AsyncHandler<ImportTerminologyRequest,ImportTerminologyResult> asyncHandler)
AmazonTranslateAsync
Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology take up to 10 minutes to fully propagate and be available for use in a translation due to cache policies with the DataPlane service that performs the translations.
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<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<TranslateTextResult> translateTextAsync(TranslateTextRequest request)
AmazonTranslateAsync
Translates input text from the source language to the target language. It is not necessary to use English (en) as either the source or the target language but not all language combinations are supported by Amazon Translate. For more information, see Supported Language Pairs.
Arabic (ar)
Chinese (Simplified) (zh)
Chinese (Traditional) (zh-TW)
Czech (cs)
Danish (da)
Dutch (nl)
English (en)
Finnish (fi)
French (fr)
German (de)
Hebrew (he)
Indonesian (id)
Italian (it)
Japanese (ja)
Korean (ko)
Polish (pl)
Portuguese (pt)
Russian (ru)
Spanish (es)
Swedish (sv)
Turkish (tr)
To have Amazon Translate determine the source language of your text, you can specify auto
in the
SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon
Comprehend to determine the source language.
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. It is not necessary to use English (en) as either the source or the target language but not all language combinations are supported by Amazon Translate. For more information, see Supported Language Pairs.
Arabic (ar)
Chinese (Simplified) (zh)
Chinese (Traditional) (zh-TW)
Czech (cs)
Danish (da)
Dutch (nl)
English (en)
Finnish (fi)
French (fr)
German (de)
Hebrew (he)
Indonesian (id)
Italian (it)
Japanese (ja)
Korean (ko)
Polish (pl)
Portuguese (pt)
Russian (ru)
Spanish (es)
Swedish (sv)
Turkish (tr)
To have Amazon Translate determine the source language of your text, you can specify auto
in the
SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon
Comprehend to determine the source language.
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 void shutdown()
getExecutorService().shutdown()
followed by getExecutorService().awaitTermination()
prior to
calling this method.shutdown
in interface AmazonTranslate
shutdown
in class AmazonWebServiceClient
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.