|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.interpreter.VoiceXmlInterpreterContext
public final class VoiceXmlInterpreterContext
Component that uses a VoiceXML interpreter to interpret a VoiceXML document and that may also interact with the implementation platform independent of the VoiceXML interpreter.
| Constructor Summary | |
|---|---|
VoiceXmlInterpreterContext(JVoiceXmlSession currentSession,
Configuration config)
Create a new object. |
|
VoiceXmlInterpreterContext(JVoiceXmlSession currentSession,
Configuration config,
ScopeObserver observer)
Create a new object. |
|
| Method Summary | |
|---|---|
GrammarDocument |
acquireExternalGrammar(URI uri,
FetchAttributes attributes)
Acquire the VoiceXML document with the given URI. |
VoiceXmlDocument |
acquireVoiceXmlDocument(DocumentDescriptor descriptor)
Acquires the VoiceXML document with the given URI. |
void |
close()
Closes all open resources. |
void |
enterScope(Scope scope)
Enter a new scope for resolving variables. this is useful if we enter a new block, but at least every file should have it's own scope. |
void |
exitScope(Scope scope)
Return from a previously created scope. i.e. pop current scope from stack. |
ActiveGrammarSet |
getActiveGrammarSet()
Retrieves the active grammar set. |
Application |
getApplication()
Retrieves the application. |
CallControlProperties |
getCallControlProperties(FormInterpretationAlgorithm fia)
Loads the speech recognizer properties. |
Configuration |
getConfiguration()
Retrieves the configuration. |
DocumentServer |
getDocumentServer()
Retrieves a reference to the document server. |
DtmfRecognizerProperties |
getDtmfRecognizerProperties(FormInterpretationAlgorithm fia)
Loads the DTMF recognizer properties. |
EventHandler |
getEventHandler()
Retrieves the event handler to use in this context. |
GrammarProcessor |
getGrammarProcessor()
Retrieves a reference to the grammar processor. |
ImplementationPlatform |
getImplementationPlatform()
Retrieves a reference to the used implementation platform. |
String |
getProperty(String name)
Retrieves the value of the given property. |
String |
getProperty(String name,
String defValue)
Retrieves the value of the given property. |
ScopeObserver |
getScopeObserver()
Retrieves the scope observer for this session. |
ScriptingEngine |
getScriptingEngine()
Lazy instantiation of the scripting engine. |
Session |
getSession()
Retrieves the current session. |
SpeechRecognizerProperties |
getSpeechRecognizerProperties(FormInterpretationAlgorithm fia)
Loads the speech recognizer properties. |
boolean |
isInitializingSubdialog()
Checks if the interpreter is in the initialzing phase of a subdialog. |
VoiceXmlDocument |
loadDocument(DocumentDescriptor descriptor)
Loads the document of the descriptor with the associated attributes and adds it to the list of loaded documents. |
void |
process(Application appl)
Starts processing the given application. |
void |
processSubdialog(Application appl,
DocumentDescriptor desc)
Starts processing the given application. |
void |
setProperty(String name,
String value)
Sets the property with the given name to the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VoiceXmlInterpreterContext(JVoiceXmlSession currentSession,
Configuration config)
currentSession - the current sessionconfig - the configuration to use.
public VoiceXmlInterpreterContext(JVoiceXmlSession currentSession,
Configuration config,
ScopeObserver observer)
currentSession - The current sessionconfig - the configuration to use.observer - the scope observer (not taken from the session).| Method Detail |
|---|
public Session getSession()
public ScopeObserver getScopeObserver()
public ImplementationPlatform getImplementationPlatform()
public GrammarProcessor getGrammarProcessor()
public Configuration getConfiguration()
public ScriptingEngine getScriptingEngine()
public EventHandler getEventHandler()
public void enterScope(Scope scope)
scope - the new scope.public void exitScope(Scope scope)
scope - The scope which was left.public void close()
public ActiveGrammarSet getActiveGrammarSet()
public void setProperty(String name,
String value)
name - Name of the property.value - Value of the property.public String getProperty(String name)
name - Name of the property.
public String getProperty(String name,
String defValue)
name - name of the property.defValue - the default value, if the property is not defined.
public SpeechRecognizerProperties getSpeechRecognizerProperties(FormInterpretationAlgorithm fia)
throws ConfigurationException
fia - the current form interpretation algorithm, maybe
null.
ConfigurationException - if the object could not be loaded.
public DtmfRecognizerProperties getDtmfRecognizerProperties(FormInterpretationAlgorithm fia)
throws ConfigurationException
fia - the current form interpretation algorithm, maybe
null.
ConfigurationException - if the object could not be loaded.
public CallControlProperties getCallControlProperties(FormInterpretationAlgorithm fia)
throws ConfigurationException
fia - the current form interpretation algorithm, maybe
null.
ConfigurationException - if the object could not be loaded.public Application getApplication()
public void process(Application appl)
throws ErrorEvent
appl - The application to process.
ErrorEvent - Error processing the document.
public void processSubdialog(Application appl,
DocumentDescriptor desc)
throws JVoiceXMLEvent
appl - the application to process.desc - the documnet descriptor for the subdialog
JVoiceXMLEvent - Error processing the document.public boolean isInitializingSubdialog()
true if the interpreter is in the initialzing phase
of a subdialog.
public VoiceXmlDocument loadDocument(DocumentDescriptor descriptor)
throws BadFetchError
If an application is active, the descriptor is also modified to contain the resolved URI.
descriptor - descriptor of the next document to process.
BadFetchError - Error retrieving the document.public DocumentServer getDocumentServer()
public VoiceXmlDocument acquireVoiceXmlDocument(DocumentDescriptor descriptor)
throws BadFetchError
If a relative URI is given, the scheme and authority of the last document are used to create a hierarchical URI for the next document.
descriptor - descriptor of the next document to process.
BadFetchError - Error retrieving the document.
public GrammarDocument acquireExternalGrammar(URI uri,
FetchAttributes attributes)
throws BadFetchError
If a relative URI is given, the scheme and authority of the last document are used to create a hierarchical URI for the next document.
uri - URI of the next document to process.attributes - attributes governing the fetch.
BadFetchError - Error retrieving the document.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||