|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.SRInstance
public class SRInstance
SRInstance is the SpeakRight runtime for a single call. It manages execution of the flow objects. It is Serializable so SpeakRight can save & restore state between HTTP requests.
| Field Summary | |
|---|---|
boolean |
m_dtmfOnlyModeIsActive
|
Trail |
m_trail
|
| Constructor Summary | |
|---|---|
SRInstance()
|
|
| Method Summary | |
|---|---|
IFlow |
ApplicationFlow()
Get the outermost flow object, that was passed to start. |
boolean |
failed(SRError parent)
extracts any errors that this SRInstance object logged. |
void |
finishActivation()
MUST be called after activating (restoring this object using serialization). |
Grammar |
fixupGrammar(Grammar gram)
Walk the flow stack until a flow object returns non-null from it's fixupGrammar method. |
java.lang.String |
fixupPrompt(java.lang.String item)
Walk the flow stack until a flow object returns non-null from it's fixupPrompt method. |
static void |
forceUCIReset()
used for unit testing only |
void |
generateFinPage()
Generate the final page for the application. |
java.lang.String |
getContent()
Get the content (the VoiceXML page). |
boolean |
isFailed()
Has an error ocurred yet. |
boolean |
isFinished()
Has the application finished. |
boolean |
isPaused()
Is the application paused. |
boolean |
isStarted()
Has start been called. |
java.lang.String |
language()
Get the current language |
SRLocations |
locations()
Get the locations object. |
void |
log(java.lang.String message)
Log to the SpeakRight logger (log4j) |
IFlow |
peekCurrent()
Get the currently executing flow object. |
void |
prepareToPassivate()
When saving state in a servlet, we're going to just save the whoe SRInstance object in the HttpSession. |
void |
proceed(SRResults results)
Continue execution, using the given results that we returned by the voicexml platform to determine what flow is executed next. |
void |
registerPromptFile(java.lang.String path)
Register a prompt file, for the duration of the call. |
void |
restoreModelBinder(IModelBinder binder)
Restore the model binder. |
void |
resume()
Resume (after pausing). |
boolean |
runAll(IFlow flow)
used for unit tests only. |
void |
setContentLogging(java.lang.String dir)
|
void |
setExtensionFactory(ISRExtensionFactory factory)
Set the extension point factory. |
void |
setGrammarBaseUrl(java.lang.String url)
Set the URL of grammar files. |
void |
setInstrumentation(ISRInstrumentation instrumentation)
Set the instrumentation object (can be at most one) |
void |
setLanguage(java.lang.String s)
Set the current language. |
void |
setModelBinder(IModel model,
IModelBinder binder)
Set the model and model binder. |
void |
setPromptBaseUrl(java.lang.String url)
Set the URL of audio files. |
void |
setPromptLogging(boolean b)
Enable/disable logging of prompts during rendering. |
void |
setReturnUrl(java.lang.String url)
Set the return url, which is used in the submit VoiceXML tag to POST the results of a page back. |
void |
setSROBaseUrl(java.lang.String url)
Set the base URL of sro files. |
boolean |
start(IFlow flow)
Start the application. |
int |
UCI()
Unique Call Identifier (UCI) is a value generated by SpeakRight to distinguish one session (phone call) from another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Trail m_trail
public boolean m_dtmfOnlyModeIsActive
| Constructor Detail |
|---|
public SRInstance()
| Method Detail |
|---|
public void prepareToPassivate()
public void finishActivation()
public void registerPromptFile(java.lang.String path)
path - public void setPromptLogging(boolean b)
b - public void setReturnUrl(java.lang.String url)
url - public void setGrammarBaseUrl(java.lang.String url)
url - usually a url within the java web application, such
as "http://somecompany.com/speechapp1/grammar"public void setSROBaseUrl(java.lang.String url)
url - usually a url within the java web application, such
as "http://somecompany.com/speechapp1/sro"public void setPromptBaseUrl(java.lang.String url)
url - usually a url within the java web application, such
as "http://somecompany.com/speechapp1/audio"public void setInstrumentation(ISRInstrumentation instrumentation)
instrumentation - object that gets notified of important things
during the session (phone call).public void setContentLogging(java.lang.String dir)
public static void forceUCIReset()
public int UCI()
public void log(java.lang.String message)
message - public boolean failed(SRError parent)
parent - error object to copy error info into.
public IFlow ApplicationFlow()
start.
public void setModelBinder(IModel model,
IModelBinder binder)
start
model - the IModel object used by this session (phone call)binder - a model binder (usually ModelBinder)public void restoreModelBinder(IModelBinder binder)
binder - a new ModelBinder object.public void setExtensionFactory(ISRExtensionFactory factory)
factory - public java.lang.String language()
public void setLanguage(java.lang.String s)
s - language, such as "en-us"public SRLocations locations()
public boolean isFailed()
public boolean start(IFlow flow)
flow - the application flow object.
public void generateFinPage()
public java.lang.String fixupPrompt(java.lang.String item)
fixupPrompt method.
fixupPrompt in interface IPromptAdjusterpublic Grammar fixupGrammar(Grammar gram)
fixupGrammar method.
fixupGrammar in interface IGrammarAdjustergram - A grammar object that is being rendered
public java.lang.String getContent()
start or proceed
public void resume()
public boolean isPaused()
public void proceed(SRResults results)
results - results from the voicexml platform. These are the results of executing the previous page.public boolean isFinished()
public boolean isStarted()
start been called.
public IFlow peekCurrent()
public boolean runAll(IFlow flow)
flow -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||