org.jvoicexml.xml.vxml
Class Transfer

java.lang.Object
  extended by org.jvoicexml.xml.AbstractXmlNode
      extended by org.jvoicexml.xml.vxml.Transfer
All Implemented Interfaces:
VoiceXmlNode, XmlNode, Node

public final class Transfer
extends AbstractXmlNode

Transfer the caller to another destination.

The <transfer> element directs the interpreter to connect the caller to another entity (e.g. telephone line or another voice application). During the transfer operation, the current interpreter session is suspended.

Version:
$Revision: 2325 $

Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Steve Doyle

Field Summary
static String ATTRIBUTE_AAI
          Application-to-application information.
static String ATTRIBUTE_AAIEXPR
          An ECMAScript expression yielding the AAI data.
static String ATTRIBUTE_BRIDGE
          Determines whether the platform remains in the connection with the caller and callee.
static String ATTRIBUTE_COND
          An expression that must evaluate to true in order for the form item to be visited.
static String ATTRIBUTE_CONNECTTIMEOUT
          The time to wait while trying to connect the call before returning the noanswer condition.
static String ATTRIBUTE_DEST
          The URI of the destination (telephone, IP telephony address).
static String ATTRIBUTE_DESTEXPR
          An ECMAScript expression yielding the URI of the destination.
static String ATTRIBUTE_EXPR
          The initial value of the form item variable; default is ECMAScript undefined.
static String ATTRIBUTE_MAXTIME
          The time that the call is allowed to last, or 0s if no limit is imposed.
static String ATTRIBUTE_NAME
          Stores the outcome of a bridge transfer attempt.
protected static ArrayList<String> ATTRIBUTE_NAMES
          Supported attribute names for this node.
static String ATTRIBUTE_TRANSFERAUDIO
          The URI of audio source to play while the transfer attempt is in progress (before far-end answer).
static String ATTRIBUTE_TYPE
          The type of transfer.
static String TAG_NAME
          Name of the tag.
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
Transfer()
          Construct a new transfer object without a node.
 
Method Summary
 Text addText(String text)
          Create a new text within this node.
protected  boolean canContainChild(String tagName)
          Can the specified sub-tag be contained within this node?
 String getAai()
          Retrieve the aai attribute.
 String getAaiexpr()
          Retrieve the aaiexpr attribute.
 Collection<String> getAttributeNames()
          Returns a collection of permitted attribute names for the node.
 String getBridge()
          Retrieve the bridge attribute.
 String getCond()
          Retrieve the cond attribute.
 String getConnecttimeout()
          Retrieve the connecttimeout attribute.
 String getDest()
          Retrieve the dest attribute.
 String getDestexpr()
          Retrieve the destexpr attribute.
 String getExpr()
          Retrieve the expr attribute.
 String getMaxtime()
          Retrieve the maxtime attribute.
 String getName()
          Retrieve the name attribute.
 String getTagName()
          Get the name of the tag for the derived node.
 String getTransferaudio()
          Retrieve the transferaudio attribute.
 String getType()
          Retrieve the type attribute.
 boolean isBridge()
          Checks if the requested transfer is a bridge transfer.
 XmlNode newInstance(Node n, XmlNodeFactory<? extends XmlNode> factory)
          Create a new instance for the given node.
 void setAai(String aai)
          Set the aai attribute.
 void setAaiexpr(String aaiexpr)
          Set the aaiexpr attribute.
 void setBridge(boolean bridge)
          Sets the bridge attribute.
 void setBridge(String bridge)
          Sets the bridge attribute.
 void setCond(String cond)
          Set the cond attribute.
 void setConnecttimeout(String connecttimeout)
          Set the connecttimeout attribute.
 void setDest(String dest)
          Set the dest attribute.
 void setDestexpr(String destexpr)
          Set the destexpr attribute.
 void setExpr(String expr)
          Set the expr attribute.
 void setMaxtime(String maxtime)
          Set the maxtime attribute.
 void setName(String name)
          Set the name attribute.
 void setTransferaudio(String transferaudio)
          Set the transferaudio attribute.
 void setType(String type)
          Set the type attribute.
 
Methods inherited from class org.jvoicexml.xml.AbstractXmlNode
addChild, addChild, appendChild, appendChild, appendDeepClone, cloneNode, compareDocumentPosition, equals, getAttribute, getAttributes, getBaseURI, getChildNodes, getChildNodes, getChildren, getDefinedAttributeNames, getFeature, getFirstChild, getFirstLevelTextContent, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeFactory, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getOwnerXmlDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setNodeValue, setPrefix, setTextContent, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jvoicexml.xml.XmlNode
addChild, getAttribute, getChildNodes, getChildren, getNode, setAttribute
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

TAG_NAME

public static final String TAG_NAME
Name of the tag.

See Also:
Constant Field Values

ATTRIBUTE_NAME

public static final String ATTRIBUTE_NAME
Stores the outcome of a bridge transfer attempt. In the case of a blind transfer, this variable is undefined.

See Also:
Constant Field Values

ATTRIBUTE_EXPR

public static final String ATTRIBUTE_EXPR
The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the form item will not be visited unless the form item variable is cleared.

See Also:
Constant Field Values

ATTRIBUTE_COND

public static final String ATTRIBUTE_COND
An expression that must evaluate to true in order for the form item to be visited.

See Also:
Constant Field Values

ATTRIBUTE_DEST

public static final String ATTRIBUTE_DEST
The URI of the destination (telephone, IP telephony address). Platforms must support the tel: URL syntax described in RFC2806 and may support other URI-based addressing schemes.

See Also:
Constant Field Values

ATTRIBUTE_DESTEXPR

public static final String ATTRIBUTE_DESTEXPR
An ECMAScript expression yielding the URI of the destination.

See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final String ATTRIBUTE_TYPE
The type of transfer. The value can be "bridge", "blind", or "consultation".

See Also:
Constant Field Values

ATTRIBUTE_BRIDGE

public static final String ATTRIBUTE_BRIDGE
Determines whether the platform remains in the connection with the caller and callee.

bridge="true"

Bridge transfer. The platform adds the callee to the connection. Document interpretation suspends until the transferred call terminates. The platform remains in the connection for the duration of the transferred call; listening during transfer is controlled by any included <grammar>s.

If the caller disconnects by going onhook or if the network disconnects the caller, the platform throws a connection.disconnect.hangup event.

If the connection is released for any other reason, that outcome is reported in the name attribute (see the following table).

bridge="false"

Blind transfer (default). The platform redirects the caller to the callee without remaining in the connection, and does not monitor the outcome.

The platform throws a connection.disconnect.transfer immediately, regardless of whether the transfer was successful or not.

See Also:
Constant Field Values

ATTRIBUTE_CONNECTTIMEOUT

public static final String ATTRIBUTE_CONNECTTIMEOUT
The time to wait while trying to connect the call before returning the noanswer condition. The value is a Time Designation. Only applies if bridge is true. Default is platform specific.

See Also:
Constant Field Values

ATTRIBUTE_MAXTIME

public static final String ATTRIBUTE_MAXTIME
The time that the call is allowed to last, or 0s if no limit is imposed. The value is a Time Designation. Only applies if bridge is true. Default is 0s.

See Also:
Constant Field Values

ATTRIBUTE_TRANSFERAUDIO

public static final String ATTRIBUTE_TRANSFERAUDIO
The URI of audio source to play while the transfer attempt is in progress (before far-end answer).

See Also:
Constant Field Values

ATTRIBUTE_AAI

public static final String ATTRIBUTE_AAI
Application-to-application information. A string containing data sent to an application on the far-end, available in the session variable session.connection.aai.

See Also:
Constant Field Values

ATTRIBUTE_AAIEXPR

public static final String ATTRIBUTE_AAIEXPR
An ECMAScript expression yielding the AAI data.

See Also:
Constant Field Values

ATTRIBUTE_NAMES

protected static final ArrayList<String> ATTRIBUTE_NAMES
Supported attribute names for this node.

Constructor Detail

Transfer

public Transfer()
Construct a new transfer object without a node.

This is necessary for the node factory.

See Also:
VoiceXmlNodeFactory
Method Detail

getTagName

public String getTagName()
Get the name of the tag for the derived node.

Returns:
name of the tag.

newInstance

public XmlNode newInstance(Node n,
                           XmlNodeFactory<? extends XmlNode> factory)
Create a new instance for the given node.

Each XmlNode can serve as a prototype in a XmlNodeFactory to produce a collection of child nodes. Factories can then use the prototype pattern to produce new nodes.

Parameters:
n - The node to encapsulate.
factory - the factroy that calls this method.
Returns:
The new instance.
See Also:
XmlNodeFactory

getName

public String getName()
Retrieve the name attribute.

Returns:
Value of the name attribute.
See Also:
ATTRIBUTE_NAME

setName

public void setName(String name)
Set the name attribute.

Parameters:
name - Value of the name attribute.
See Also:
ATTRIBUTE_NAME

getExpr

public String getExpr()
Retrieve the expr attribute.

Returns:
Value of the expr attribute.
See Also:
ATTRIBUTE_EXPR

setExpr

public void setExpr(String expr)
Set the expr attribute.

Parameters:
expr - Value of the expr attribute.
See Also:
ATTRIBUTE_EXPR

getCond

public String getCond()
Retrieve the cond attribute.

Returns:
Value of the cond attribute.
See Also:
ATTRIBUTE_COND

setCond

public void setCond(String cond)
Set the cond attribute.

Parameters:
cond - Value of the cond attribute.
See Also:
ATTRIBUTE_COND

getDest

public String getDest()
Retrieve the dest attribute.

Returns:
Value of the dest attribute.
See Also:
ATTRIBUTE_DEST

setDest

public void setDest(String dest)
Set the dest attribute.

Parameters:
dest - Value of the dest attribute.
See Also:
ATTRIBUTE_DEST

getDestexpr

public String getDestexpr()
Retrieve the destexpr attribute.

Returns:
Value of the destexpr attribute.
See Also:
ATTRIBUTE_DESTEXPR

setDestexpr

public void setDestexpr(String destexpr)
Set the destexpr attribute.

Parameters:
destexpr - Value of the destexpr attribute.
See Also:
ATTRIBUTE_DESTEXPR

isBridge

public boolean isBridge()
Checks if the requested transfer is a bridge transfer.

Returns:
true if the requested transfer is a bridge transfer.
Since:
0.7

getBridge

public String getBridge()
Retrieve the bridge attribute.

Returns:
Value of the bridge attribute.
See Also:
ATTRIBUTE_BRIDGE

setBridge

public void setBridge(String bridge)
Sets the bridge attribute.

Parameters:
bridge - Value of the bridge attribute.
See Also:
ATTRIBUTE_BRIDGE

setBridge

public void setBridge(boolean bridge)
Sets the bridge attribute.

Parameters:
bridge - Value of the bridge attribute.
Since:
0.7
See Also:
ATTRIBUTE_BRIDGE

getConnecttimeout

public String getConnecttimeout()
Retrieve the connecttimeout attribute.

Returns:
Value of the connecttimeout attribute.
See Also:
ATTRIBUTE_CONNECTTIMEOUT

setConnecttimeout

public void setConnecttimeout(String connecttimeout)
Set the connecttimeout attribute.

Parameters:
connecttimeout - Value of the connecttimeout attribute.
See Also:
ATTRIBUTE_CONNECTTIMEOUT

getMaxtime

public String getMaxtime()
Retrieve the maxtime attribute.

Returns:
Value of the maxtime attribute.
See Also:
ATTRIBUTE_MAXTIME

setMaxtime

public void setMaxtime(String maxtime)
Set the maxtime attribute.

Parameters:
maxtime - Value of the maxtime attribute.
See Also:
ATTRIBUTE_MAXTIME

getTransferaudio

public String getTransferaudio()
Retrieve the transferaudio attribute.

Returns:
Value of the transferaudio attribute.
See Also:
ATTRIBUTE_TRANSFERAUDIO

setTransferaudio

public void setTransferaudio(String transferaudio)
Set the transferaudio attribute.

Parameters:
transferaudio - Value of the transferaudio attribute.
See Also:
ATTRIBUTE_TRANSFERAUDIO

getAai

public String getAai()
Retrieve the aai attribute.

Returns:
Value of the aai attribute.
See Also:
ATTRIBUTE_AAI

setAai

public void setAai(String aai)
Set the aai attribute.

Parameters:
aai - Value of the aai attribute.
See Also:
ATTRIBUTE_AAI

getAaiexpr

public String getAaiexpr()
Retrieve the aaiexpr attribute.

Returns:
Value of the aaiexpr attribute.
See Also:
ATTRIBUTE_AAIEXPR

setAaiexpr

public void setAaiexpr(String aaiexpr)
Set the aaiexpr attribute.

Parameters:
aaiexpr - Value of the aaiexpr attribute.
See Also:
ATTRIBUTE_AAIEXPR

getType

public String getType()
Retrieve the type attribute.

Returns:
Value of the type attribute.
See Also:
ATTRIBUTE_TYPE

setType

public void setType(String type)
Set the type attribute.

Parameters:
type - Value of the type attribute.
See Also:
ATTRIBUTE_TYPE

addText

public Text addText(String text)
Create a new text within this node.

Parameters:
text - The text to be added.
Returns:
The new created text.

canContainChild

protected boolean canContainChild(String tagName)
Can the specified sub-tag be contained within this node?

Specified by:
canContainChild in class AbstractXmlNode
Parameters:
tagName - Name of child.
Returns:
True if the sub-tag is allowed on this node.

getAttributeNames

public Collection<String> getAttributeNames()
Returns a collection of permitted attribute names for the node.

Specified by:
getAttributeNames in interface XmlNode
Overrides:
getAttributeNames in class AbstractXmlNode
Returns:
A collection of attribute names that are allowed for the node


Copyright © 2005-2009JVoiceXML group.