@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AmazonLexRuntimeV2AsyncClient extends AmazonLexRuntimeV2Client implements AmazonLexRuntimeV2Async
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
static AmazonLexRuntimeV2AsyncClientBuilder |
asyncBuilder() |
Future<DeleteSessionResult> |
deleteSessionAsync(DeleteSessionRequest request)
Removes session information for a specified bot, alias, and user ID.
|
Future<DeleteSessionResult> |
deleteSessionAsync(DeleteSessionRequest request,
AsyncHandler<DeleteSessionRequest,DeleteSessionResult> asyncHandler)
Removes session information for a specified bot, alias, and user ID.
|
ExecutorService |
getExecutorService()
Returns the executor service used by this client to execute async requests.
|
Future<GetSessionResult> |
getSessionAsync(GetSessionRequest request)
Returns session information for a specified bot, alias, and user.
|
Future<GetSessionResult> |
getSessionAsync(GetSessionRequest request,
AsyncHandler<GetSessionRequest,GetSessionResult> asyncHandler)
Returns session information for a specified bot, alias, and user.
|
Future<PutSessionResult> |
putSessionAsync(PutSessionRequest request)
Creates a new session or modifies an existing session with an Amazon Lex V2 bot.
|
Future<PutSessionResult> |
putSessionAsync(PutSessionRequest request,
AsyncHandler<PutSessionRequest,PutSessionResult> asyncHandler)
Creates a new session or modifies an existing session with an Amazon Lex V2 bot.
|
Future<RecognizeTextResult> |
recognizeTextAsync(RecognizeTextRequest request)
Sends user input to Amazon Lex V2.
|
Future<RecognizeTextResult> |
recognizeTextAsync(RecognizeTextRequest request,
AsyncHandler<RecognizeTextRequest,RecognizeTextResult> asyncHandler)
Sends user input to Amazon Lex V2.
|
Future<RecognizeUtteranceResult> |
recognizeUtteranceAsync(RecognizeUtteranceRequest request)
Sends user input to Amazon Lex V2.
|
Future<RecognizeUtteranceResult> |
recognizeUtteranceAsync(RecognizeUtteranceRequest request,
AsyncHandler<RecognizeUtteranceRequest,RecognizeUtteranceResult> asyncHandler)
Sends user input to Amazon Lex V2.
|
void |
shutdown()
Shuts down the client, releasing all managed resources.
|
builder, deleteSession, getCachedResponseMetadata, getSession, putSession, recognizeText, recognizeUtterance
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
deleteSession, getCachedResponseMetadata, getSession, putSession, recognizeText, recognizeUtterance
public static AmazonLexRuntimeV2AsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<DeleteSessionResult> deleteSessionAsync(DeleteSessionRequest request)
AmazonLexRuntimeV2Async
Removes session information for a specified bot, alias, and user ID.
You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again.
You don't need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours.
If you specify a bot or alias ID that doesn't exist, you receive a BadRequestException.
If the locale doesn't exist in the bot, or if the locale hasn't been enables for the alias, you receive a
BadRequestException
.
deleteSessionAsync
in interface AmazonLexRuntimeV2Async
public Future<DeleteSessionResult> deleteSessionAsync(DeleteSessionRequest request, AsyncHandler<DeleteSessionRequest,DeleteSessionResult> asyncHandler)
AmazonLexRuntimeV2Async
Removes session information for a specified bot, alias, and user ID.
You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again.
You don't need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours.
If you specify a bot or alias ID that doesn't exist, you receive a BadRequestException.
If the locale doesn't exist in the bot, or if the locale hasn't been enables for the alias, you receive a
BadRequestException
.
deleteSessionAsync
in interface AmazonLexRuntimeV2Async
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<GetSessionResult> getSessionAsync(GetSessionRequest request)
AmazonLexRuntimeV2Async
Returns session information for a specified bot, alias, and user.
For example, you can use this operation to retrieve session information for a user that has left a long-running session in use.
If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a BadRequestException
.
If the locale doesn't exist or is not enabled for the alias, you receive a BadRequestException
.
getSessionAsync
in interface AmazonLexRuntimeV2Async
public Future<GetSessionResult> getSessionAsync(GetSessionRequest request, AsyncHandler<GetSessionRequest,GetSessionResult> asyncHandler)
AmazonLexRuntimeV2Async
Returns session information for a specified bot, alias, and user.
For example, you can use this operation to retrieve session information for a user that has left a long-running session in use.
If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a BadRequestException
.
If the locale doesn't exist or is not enabled for the alias, you receive a BadRequestException
.
getSessionAsync
in interface AmazonLexRuntimeV2Async
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<PutSessionResult> putSessionAsync(PutSessionRequest request)
AmazonLexRuntimeV2Async
Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.
putSessionAsync
in interface AmazonLexRuntimeV2Async
public Future<PutSessionResult> putSessionAsync(PutSessionRequest request, AsyncHandler<PutSessionRequest,PutSessionResult> asyncHandler)
AmazonLexRuntimeV2Async
Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.
putSessionAsync
in interface AmazonLexRuntimeV2Async
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<RecognizeTextResult> recognizeTextAsync(RecognizeTextRequest request)
AmazonLexRuntimeV2Async
Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot.
In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display.
recognizeTextAsync
in interface AmazonLexRuntimeV2Async
public Future<RecognizeTextResult> recognizeTextAsync(RecognizeTextRequest request, AsyncHandler<RecognizeTextRequest,RecognizeTextResult> asyncHandler)
AmazonLexRuntimeV2Async
Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot.
In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display.
recognizeTextAsync
in interface AmazonLexRuntimeV2Async
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<RecognizeUtteranceResult> recognizeUtteranceAsync(RecognizeUtteranceRequest request)
AmazonLexRuntimeV2Async
Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot.
The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2.
requestAttributes
sessionState
The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them.
inputTranscript
interpretations
messages
requestAttributes
sessionState
The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2.
recognizeUtteranceAsync
in interface AmazonLexRuntimeV2Async
public Future<RecognizeUtteranceResult> recognizeUtteranceAsync(RecognizeUtteranceRequest request, AsyncHandler<RecognizeUtteranceRequest,RecognizeUtteranceResult> asyncHandler)
AmazonLexRuntimeV2Async
Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot.
The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2.
requestAttributes
sessionState
The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them.
inputTranscript
interpretations
messages
requestAttributes
sessionState
The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2.
recognizeUtteranceAsync
in interface AmazonLexRuntimeV2Async
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 AmazonLexRuntimeV2
shutdown
in class AmazonLexRuntimeV2Client