|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.languagecomputer.api.SessionManager
public final class SessionManager
Session manager for accessing and creating Session
s that may be used
to interact with LCC's natural language services.
Constructor Summary | |
---|---|
SessionManager(File configFile)
Creates a new SessionManager with the given
configFile. |
Method Summary | |
---|---|
Session |
createNewSession()
Factory method to create a new Session . |
File |
getConfigFile()
Returns the configuration File that contains the options for
the Service s. |
Session |
getSession(String sessionID)
Returns an existing Session , or creates a new one with the given
sessionID. |
boolean |
initService(Class<?> service,
Properties properties)
Initializes the given service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionManager(File configFile)
SessionManager
with the given
configFile.
configFile
- The File
that contains the configuration
options of which Service
classes to use.
IllegalArgumentException
- If the configFile is
null
.Method Detail |
---|
public File getConfigFile()
File
that contains the options for
the Service
s.
public Session createNewSession() throws IOException
Session
.
Session
.
IOException
- If there was a problem with the configFile
given to the constructor.public Session getSession(String sessionID) throws IOException
Session
, or creates a new one with the given
sessionID.
sessionID
- The ID of the desired Session
.
Session
with the given sessionID.
IOException
- If there was a problem with the configFile
given to the constructor.
IllegalArgumentException
- If the sessionID is
null
.public boolean initService(Class<?> service, Properties properties) throws Exception
initService(Properties)
method if it has not yet been called
by this SessionManager
with the given Properties
.
true
if the initService
method was
called, or false
if the optional method was not
implemented.
Exception
- If the service throws an exception while initializing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |