|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.jvoicexml.interpreter.JVoiceXmlSession
public final class JVoiceXmlSession
Implementation of a Session.
Each session is started in a new thread with the session id as the name.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
JVoiceXmlSession(ImplementationPlatform ip,
JVoiceXmlCore jvxml,
ConnectionInformation connectionInformation)
Constructs a new object. |
|
| Method Summary | |
|---|---|
void |
addSessionListener(SessionListener listener)
Adds the session listener. |
void |
call(URI uri)
Handles a call request. |
CharacterInput |
getCharacterInput()
Retrieves the DTMF input device. |
DocumentServer |
getDocumentServer()
Retrieves a reference to the document server. |
GrammarProcessor |
getGrammarProcessor()
Retrieves a reference to the grammar processor. |
ImplementationPlatform |
getImplementationPlatform()
Retrieves a reference to the used implementation platform. |
ErrorEvent |
getLastError()
Retrieves an error, if any, that happened during call processing. |
ScopeObserver |
getScopeObserver()
Retrieves the scope observer for this session. |
ScriptingEngine |
getScriptingEngine()
Retrieves the scripting engine. |
String |
getSessionID()
Retrieves the universal unique identifier for this session. |
VoiceXmlInterpreterContext |
getVoiceXmlInterpreterContext()
Retrieve the VoiceXmlInterpreterContext related to this
session. |
void |
hangup()
Closes this session. |
boolean |
hasEnded()
Checks if this session has ended. |
void |
removeSessionListener(SessionListener listener)
Removes the session listener. |
void |
run()
Session working method. |
void |
waitSessionEnd()
Delays until the session ends. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JVoiceXmlSession(ImplementationPlatform ip,
JVoiceXmlCore jvxml,
ConnectionInformation connectionInformation)
ip - the implementation platform.jvxml - the main object to retrieve further resources.connectionInformation - the connection information to use| Method Detail |
|---|
public void addSessionListener(SessionListener listener)
addSessionListener in interface Sessionlistener - the session listener to add.public void removeSessionListener(SessionListener listener)
removeSessionListener in interface Sessionlistener - the session listener to remove.public String getSessionID()
getSessionID in interface Session
public void call(URI uri)
throws ErrorEvent
Starts processing of the given application and returns immediately.
Since this method returns immediately, it offers no means to monitor the
call processing and catch exceptions. Therefore clients are requested
to use the Session.waitSessionEnd() method to monitor the session.
Another way can be via the Telephony
interface and calling Session.getLastError(). However, the latter
option relies on the concrete implementation.
call in interface Sessionuri - URI of the first document to load.
ErrorEvent - Error initiating the call.public void hangup()
hangup in interface Session
public CharacterInput getCharacterInput()
throws NoresourceError,
ConnectionDisconnectHangupEvent
getCharacterInput in interface SessionNoresourceError - Input device is not available.
ConnectionDisconnectHangupEvent - the user hung up
public void waitSessionEnd()
throws ErrorEvent
waitSessionEnd in interface SessionErrorEvent - Error waiting for the end of the call.public boolean hasEnded()
hasEnded in interface Sessiontrue if the session has ended.public void run()
run in interface Runnablerun in class Threadpublic ImplementationPlatform getImplementationPlatform()
public DocumentServer getDocumentServer()
public GrammarProcessor getGrammarProcessor()
public VoiceXmlInterpreterContext getVoiceXmlInterpreterContext()
VoiceXmlInterpreterContext related to this
session.
public ScopeObserver getScopeObserver()
public ScriptingEngine getScriptingEngine()
public ErrorEvent getLastError()
getLastError in interface Sessionnull
if there was no error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||