public class RecognitionMonitor extends Object
IntentRecognitionProvider
s.
This class stores analytics information related to intent recognition, and registers a set of REST endpoints allowing to query them from external applications.
The following endpoints can be used to access the stored information:
sessionId
Constructor and Description |
---|
RecognitionMonitor(XatkitServer xatkitServer,
Configuration configuration)
|
Modifier and Type | Method and Description |
---|---|
void |
logRecognizedIntent(XatkitSession session,
com.xatkit.intent.RecognizedIntent recognizedIntent)
Logs the recognition information from the provided
recognizedIntent and session . |
void |
shutdown()
Commit the pending operations on the database and closes the connection.
|
public RecognitionMonitor(XatkitServer xatkitServer, Configuration configuration)
RecognitionMonitor
with the provided xatkitServer
and configuration
.
This constructor loads the stored information from the analytics database and create the in-memory data structures used to monitor intent recognition providers.
This constructor also registers the REST endpoints allowing to query the stored information from external applications.
This method also registers a shutdown hook which ensures that the database is closed properly when the JVM is stopped.
If the provided Configuration
specifies a value for the xatkit.data.directory
key it will be
used as the base location to create the analytics database (in <xatkit.data.directory>/analytics
/analytics.db
.
xatkitServer
- the XatkitServer
instance used to register the REST endpointsconfiguration
- the Xatkit Configuration
public void logRecognizedIntent(XatkitSession session, com.xatkit.intent.RecognizedIntent recognizedIntent)
recognizedIntent
and session
.session
- the XatkitSession
from which the RecognizedIntent
has been createdrecognizedIntent
- the RecognizedIntent
to logpublic void shutdown()
Copyright © 2020 SOM Research Lab. All rights reserved.