org.speakright.core.tests
Class TestSRApp.TestApp3

java.lang.Object
  extended by org.speakright.core.FlowBase
      extended by org.speakright.core.flows.BasicFlow
          extended by org.speakright.core.flows.SRApp
              extended by org.speakright.core.tests.TestSRApp.TestApp3
All Implemented Interfaces:
java.io.Serializable, IFlow
Enclosing class:
TestSRApp

public class TestSRApp.TestApp3
extends SRApp

app that uses goto-events

Author:
IanRaeLaptop
See Also:
Serialized Form

Field Summary
 Model M
           
 
Fields inherited from class org.speakright.core.flows.BasicFlow
m_L
 
Constructor Summary
TestSRApp.TestApp3()
           
 
Method Summary
 IFlow createGoodbye()
          Return the final flow object, that is executed after the main loop exits.
 IFlow createWelcome()
          Return the first flow object, which is usually a welcome prompt.
 void initMainLoop(LoopFlow loop)
          Return the main loop sub-flow.
 IFlow onCatch(IFlow current, SRResults results, java.lang.String eventName, ThrowEvent event)
          The default implementation of onCatch is to transfer to the operator.
 
Methods inherited from class org.speakright.core.flows.SRApp
createMainLoop, getMainLoop, isAppEvent, onBegin, onDisconnect, onNoInput, onPlatformError, onTransferFailed, onValidateFailed, transferToOperator
 
Methods inherited from class org.speakright.core.flows.BasicFlow
add, addPromptFlow, findSubFlow, getFirst, getNext, getSubFlowAfter, SubFlowCount
 
Methods inherited from class org.speakright.core.FlowBase
createRenderer, execute, executionCount, fixupGrammar, fixupPrompt, log, logError, name, onComplete, onEnd, 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

M

public Model M
Constructor Detail

TestSRApp.TestApp3

public TestSRApp.TestApp3()
Method Detail

createWelcome

public IFlow createWelcome()
Description copied from class: SRApp
Return the first flow object, which is usually a welcome prompt. Can return an entire sub-flow for welcome + login. This method is optional. The default version returns null. If you don't override this method then you must manually build the flow objects yourself in the constructure.

Overrides:
createWelcome in class SRApp
Returns:

initMainLoop

public void initMainLoop(LoopFlow loop)
Description copied from class: SRApp
Return the main loop sub-flow. Most apps have an infinite loop that presents a main menu. You can use the loop param passed in, or create one yourself. Populate it with flow objects and return the loop object. This method is optional. The default version returns null. If you don't override this method then you must manually build the flow objects yourself in the constructure.

Overrides:
initMainLoop in class SRApp

createGoodbye

public IFlow createGoodbye()
Description copied from class: SRApp
Return the final flow object, that is executed after the main loop exits. This final flow object usually is a goodbye prompt. This method is optional. The default version returns null. If you don't override this method then you must manually build the flow objects yourself in the constructure.

Overrides:
createGoodbye in class SRApp
Returns:

onCatch

public IFlow onCatch(IFlow current,
                     SRResults results,
                     java.lang.String eventName,
                     ThrowEvent event)
Description copied from class: SRApp
The default implementation of onCatch is to transfer to the operator.

Specified by:
onCatch in interface IFlow
Overrides:
onCatch in class SRApp
Parameters:
current - the currently executing flow object.
results - the results of current's execution.
eventName - name of the event. most event handling can be done using just the name.
event - event object. advanced event handling may require the actual event object
Returns:
the next flow to run, or null which means this flow object does not handle this event.