@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.
configFactoryclient, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffsetENDPOINT_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, translateTextaddRequestHandler, addRequestHandler, beforeClientExecution, beforeMarshalling, calculateCRC32FromCompressedData, checkMutability, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, createSignerProvider, endClientExecution, endClientExecution, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerOverride, getSignerProvider, getSignerRegionOverride, getSigningRegion, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, makeImmutable, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, useStrictHostNameVerification, withEndpoint, withRegion, withRegion, withTimeOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCachedResponseMetadata, translateTextpublic static AmazonTranslateAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<TranslateTextResult> translateTextAsync(TranslateTextRequest request)
AmazonTranslateAsyncTranslates 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 AmazonTranslateAsyncpublic Future<TranslateTextResult> translateTextAsync(TranslateTextRequest request, AsyncHandler<TranslateTextRequest,TranslateTextResult> asyncHandler)
AmazonTranslateAsyncTranslates 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 AmazonTranslateAsyncasyncHandler - 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 AmazonTranslateshutdown in class AmazonWebServiceClientCopyright © 2018. All rights reserved.