|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.FlowBase
org.speakright.core.flows.BasicFlow
public class BasicFlow
BasicFlow is a base class for most flow objects. It
supports sub-flows which you add using the add method.
Sub-flows can be optional; if their shouldExeucte returns false, they are skipped
and the next sub-flow is run. It's an error if all the sub-flows return false from their
shouldExecute method.
| Field Summary | |
|---|---|
protected java.util.ArrayList<IFlow> |
m_L
|
| Constructor Summary | |
|---|---|
BasicFlow()
|
|
| Method Summary | |
|---|---|
void |
add(IFlow flow)
add a sub-flow. |
void |
addPromptFlow(java.lang.String ptext)
Adds a prompt flow object. |
protected int |
findSubFlow(IFlow subFlow)
Get the index of subFlow, if its one of our sub-flows |
IFlow |
getFirst(IFlowContext context)
If there are sub-flows then return the first one, otherwise return self. |
IFlow |
getNext(IFlow current,
SRResults results)
get the next flow. |
IFlow |
getSubFlowAfter(IFlow subFlow)
Return the next sub-flow after subFlow. |
int |
SubFlowCount()
get the number of sub-flows of this flow. |
| Methods inherited from class org.speakright.core.FlowBase |
|---|
createRenderer, execute, executionCount, fixupGrammar, fixupPrompt, log, logError, name, onBegin, onCatch, onComplete, onDisconnect, onEnd, onNoInput, onPlatformError, onTransferFailed, onValidateFailed, promptGroup, setExecutionCount, setName, setPromptGroup, shouldExecute, validateInput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList<IFlow> m_L
| Constructor Detail |
|---|
public BasicFlow()
| Method Detail |
|---|
public int SubFlowCount()
public void add(IFlow flow)
flow - public void addPromptFlow(java.lang.String ptext)
ptext - prompt textpublic IFlow getFirst(IFlowContext context)
getFirst in interface IFlowgetFirst in class FlowBasepublic IFlow getSubFlowAfter(IFlow subFlow)
IFlow
getSubFlowAfter in interface IFlowgetSubFlowAfter in class FlowBaseprotected int findSubFlow(IFlow subFlow)
subFlow - a possible sub-flow object.
public IFlow getNext(IFlow current,
SRResults results)
getNext in interface IFlowgetNext in class FlowBasecurrent - the currently executing flow object. More precisely, current is the flow
object that this object most recently returned from getFirst or getNext.results - the results of current's execution by the speech platform. Results
contains user input and/or events such as disconnect or platform-error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||