org.speakright.core.flows
Class TransferFlow

java.lang.Object
  extended by org.speakright.core.FlowBase
      extended by org.speakright.core.flows.TransferFlow
All Implemented Interfaces:
java.io.Serializable, IFlow
Direct Known Subclasses:
genSROTransferCall

public class TransferFlow
extends FlowBase

A call control flow object that transfers the call.

Author:
IanRaeLaptop
See Also:
Serialized Form

Nested Class Summary
static class TransferFlow.TransferType
          tranfer types from VXML 2.1
 
Constructor Summary
TransferFlow()
           
TransferFlow(TransferFlow.TransferType type, java.lang.String destination)
           
TransferFlow(TransferFlow.TransferType type, java.lang.String destination, java.lang.String ptext)
           
 
Method Summary
 IFlowRenderer createRenderer()
          Create the type-specific renderer
 java.lang.String Destination()
           
 IFlow onTransferFailed(IFlow current, SRResults results)
          Handle a failed transfer.
 java.lang.String Prompt()
           
 void setDestination(java.lang.String destination)
           
 void setPrompt(java.lang.String ptext)
           
 void setType(TransferFlow.TransferType type)
           
 TransferFlow.TransferType Type()
           
 
Methods inherited from class org.speakright.core.FlowBase
execute, 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

TransferFlow

public TransferFlow()

TransferFlow

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

TransferFlow

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

Prompt

public java.lang.String Prompt()

setPrompt

public void setPrompt(java.lang.String ptext)

Destination

public java.lang.String Destination()

setDestination

public void setDestination(java.lang.String destination)

Type

public TransferFlow.TransferType Type()

setType

public void setType(TransferFlow.TransferType type)

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. Rather than expose the error prompt as a field, we encourage users to use SROTransferCall, or to override onTransferFailed.

Specified by:
onTransferFailed in interface IFlow
Overrides:
onTransferFailed in class FlowBase
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.

createRenderer

public IFlowRenderer createRenderer()
Create the type-specific renderer

Specified by:
createRenderer in interface IFlow
Overrides:
createRenderer in class FlowBase