org.speakright.sro
Class SROTransferCall

java.lang.Object
  extended by org.speakright.core.FlowBase
      extended by org.speakright.core.flows.TransferFlow
          extended by org.speakright.sro.gen.genSROTransferCall
              extended by org.speakright.sro.SROTransferCall
All Implemented Interfaces:
java.io.Serializable, IFlow

public class SROTransferCall
extends genSROTransferCall

SRO for transferring a phone call. Usage of this class is preferred over TransferFlow because the transfer-failed prompt in SROTransferCall can be modified by external prompt XML file.

Author:
IanRaeLaptop
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.speakright.core.flows.TransferFlow
TransferFlow.TransferType
 
Field Summary
 
Fields inherited from class org.speakright.sro.gen.genSROTransferCall
m_mainPrompt, m_transferFailedPrompt
 
Constructor Summary
SROTransferCall(java.lang.String destination)
           
SROTransferCall(java.lang.String destination, TransferFlow.TransferType type)
           
 
Method Summary
 void execute(IExecutionContext context)
          The default implementation of execute is to render this object.
 IFlow onTransferFailed(IFlow current, SRResults results)
          Handle a failed transfer.
 
Methods inherited from class org.speakright.sro.gen.genSROTransferCall
set_mainPrompt, set_transferFailedPrompt
 
Methods inherited from class org.speakright.core.flows.TransferFlow
createRenderer, Destination, Prompt, setDestination, setPrompt, setType, Type
 
Methods inherited from class org.speakright.core.FlowBase
executionCount, fixupGrammar, fixupPrompt, getFirst, getNext, getSubFlowAfter, log, logError, name, onBegin, onCatch, onComplete, onDisconnect, onEnd, onNoInput, onPlatformError, 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
 

Constructor Detail

SROTransferCall

public SROTransferCall(java.lang.String destination)

SROTransferCall

public SROTransferCall(java.lang.String destination,
                       TransferFlow.TransferType type)
Method Detail

execute

public void execute(IExecutionContext context)
Description copied from class: FlowBase
The default implementation of execute is to render this object. However the default rendering is a 'silent' voicexml page.

Specified by:
execute in interface IFlow
Overrides:
execute in class genSROTransferCall
Parameters:
context - Contains the page renderer.

onTransferFailed

public IFlow onTransferFailed(IFlow current,
                              SRResults results)
Handle a failed transfer. results.m_transferResult will contain the reason for the failure ("busy", "rna", etc)

The default implementation is to play a short error message and continue. To change this behaviour, override this method and either throw an event or return a sub-flow object to run.

Specified by:
onTransferFailed in interface IFlow
Overrides:
onTransferFailed in class TransferFlow
Parameters:
current - the currently executing flow object.
results - the results of current's execution. In this case results will contain a TransferFailed result code.
Returns:
the next flow to run, or null which means this flow object does not handle this event.