|
||||||||||
| 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
org.speakright.core.flows.LoopFlow
public class LoopFlow
Represents looping behaviour. The given set of sub-flow objects
will be executed numIterations times.
Callflows often repeat things several times (three login attempts then fail),
or infinitely (such as a main menu).
| Field Summary | |
|---|---|
static int |
FOREVER
|
| Fields inherited from class org.speakright.core.flows.BasicFlow |
|---|
m_L |
| Constructor Summary | |
|---|---|
LoopFlow()
Create a loop that loops forever (unless you change this using setNumIterations |
|
LoopFlow(int numIterations)
Create a loop that iterates the given number of times. |
|
| Method Summary | |
|---|---|
void |
add(IFlow flow)
add a sub-flow. |
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 sub-flow. |
IFlow |
getSubFlowAfter(IFlow subFlow)
Return the next sub-flow after subFlow. |
int |
numIterations()
Get the number of times this loop will iterate. |
void |
setNumIterations(int numIterations)
Set (or change) the number of iterations. |
| Methods inherited from class org.speakright.core.flows.BasicFlow |
|---|
addPromptFlow, findSubFlow, SubFlowCount |
| 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 |
|---|
public static final int FOREVER
| Constructor Detail |
|---|
public LoopFlow()
setNumIterations
public LoopFlow(int numIterations)
numIterations - | Method Detail |
|---|
public int numIterations()
public void setNumIterations(int numIterations)
numIterations - public void add(IFlow flow)
BasicFlow
add in class BasicFlowpublic IFlow getFirst(IFlowContext context)
BasicFlow
getFirst in interface IFlowgetFirst in class BasicFlowpublic IFlow getSubFlowAfter(IFlow subFlow)
IFlow
getSubFlowAfter in interface IFlowgetSubFlowAfter in class BasicFlow
public IFlow getNext(IFlow current,
SRResults results)
getNext in interface IFlowgetNext in class BasicFlowcurrent - 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 | |||||||||