@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 English and one of six languages, or between one of the six languages and English.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
static AmazonTranslateAsyncClientBuilder |
asyncBuilder() |
ExecutorService |
getExecutorService()
Returns the executor service used by this client to execute async requests.
|
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, getCachedResponseMetadata, translateText
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, 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
getCachedResponseMetadata, translateText
public static AmazonTranslateAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<TranslateTextResult> translateTextAsync(TranslateTextRequest request)
AmazonTranslateAsync
Translates input text from the source language to the target language. You can translate between English (en) and one of the following languages, or between one of the following languages and English.
Arabic (ar)
Chinese (Simplified) (zh)
French (fr)
German (de)
Portuguese (pt)
Spanish (es)
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. You can translate between English (en) and one of the following languages, or between one of the following languages and English.
Arabic (ar)
Chinese (Simplified) (zh)
French (fr)
German (de)
Portuguese (pt)
Spanish (es)
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.