org.echarts.servlet.sip.features.click2DialFlow4
Class JavaToClick2DialFlow4Machine

java.lang.Object
  extended by org.echarts.servlet.sip.JavaToEChartsMachine
      extended by org.echarts.servlet.sip.features.click2DialFlow4.JavaToClick2DialFlow4Machine

public final class JavaToClick2DialFlow4Machine
extends JavaToEChartsMachine

JavaToEChartsMachine interface class for the Click2DialFlow4Machine.


Constructor Summary
JavaToClick2DialFlow4Machine()
           
 
Method Summary
 void dropCalls()
          Instruct Click2DialFlow4Machine to drop calls regardless of their respective states.
 java.lang.String getApplicationSessionId()
          Return SIP application session ID associated with this interface instance.
 java.lang.String getUid()
          Return value of X-ECHARTS-UID header in INVITE to first party.
protected  void init(TransitionMachine machine)
          This method is called immediately after new JavaToEChartsMachine instance is created. Sets the value of the X-ECHARTS-UID, the NonSip controlPort, and the SIP app session ID used by the machine.
static JavaToClick2DialFlow4Machine initiate(Click2DialFlow4Bean bean)
          Initiate click-to-dial session specified by bean's fields.
static JavaToClick2DialFlow4Machine initiate(Click2DialFlow4MachineToJava machineToJava, Click2DialFlow4Bean bean)
          Initiate click-to-dial session specified by bean's fields.
static JavaToClick2DialFlow4Machine initiate(java.lang.String party1, java.lang.String party2, int timeoutSec, boolean earlyMediaReinvite)
          Initiate click-to-dial session.
static JavaToClick2DialFlow4Machine initiate(java.lang.String party1, java.lang.String party2, int timeoutSec, boolean earlyMediaReinvite, java.lang.String uid)
          Initiate click-to-dial session.
 
Methods inherited from class org.echarts.servlet.sip.JavaToEChartsMachine
getInstance, getInstance, putEvent, setBox
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaToClick2DialFlow4Machine

public JavaToClick2DialFlow4Machine()
Method Detail

initiate

public static final JavaToClick2DialFlow4Machine initiate(Click2DialFlow4Bean bean)
                                                   throws java.lang.Exception
Initiate click-to-dial session specified by bean's fields. New session will use instance of the machine's Click2DialFlow4MachineToJava interface returned by EChartsMachineToJava.getInstance().

Parameters:
bean - specifies parameters required to establish click-to-dial session e.g. first and second party addresses
Returns:
interface instance to control the click-to-dial session created by this method
Throws:
java.lang.Exception

initiate

public static final JavaToClick2DialFlow4Machine initiate(Click2DialFlow4MachineToJava machineToJava,
                                                          Click2DialFlow4Bean bean)
                                                   throws java.lang.Exception
Initiate click-to-dial session specified by bean's fields. Newly created machine will use specified instance of machine's Click2DialFlow4MachineToJava interface.

Parameters:
machineToJava - instance of implementation of machine's EChartsMachineToJava interface
bean - specifies parameters required to establish click-to-dial session e.g. first and second party addresses
Returns:
interface instance to control the click-to-dial session created by this method
Throws:
java.lang.Exception

initiate

public static final JavaToClick2DialFlow4Machine initiate(java.lang.String party1,
                                                          java.lang.String party2,
                                                          int timeoutSec,
                                                          boolean earlyMediaReinvite,
                                                          java.lang.String uid)
                                                   throws java.lang.Exception
Initiate click-to-dial session. New session will use default implementation of the machine's EChartsMachineToJava interface, Click2DialFlow4MachineToJavaImpl.

Parameters:
party1 - Address of the desired first party (String representation of SIP URI)
party2 - Address of the desired second party (String representation of SIP URI)
timeoutSec - Optional timeout in seconds for first party to answer. If no answer in the specified number of seconds, then the call will abort. A value of -1 signifies no timeout.
earlyMediaReinvite - Specifies whether or not the first party should receive a re-INVITE if the party returns an early media response.
uid - Value of X-ECHARTS-UID header in INVITE to first party. Default: null.
Returns:
interface instance to control the click-to-dial session created by this method
Throws:
java.lang.Exception

initiate

public static final JavaToClick2DialFlow4Machine initiate(java.lang.String party1,
                                                          java.lang.String party2,
                                                          int timeoutSec,
                                                          boolean earlyMediaReinvite)
                                                   throws java.lang.Exception
Initiate click-to-dial session. Value of UID is generated internally and accessible via the getUid() method.

Parameters:
party1 - Address of the desired first party (String representation of SIP URI)
party2 - Address of the desired second party (String representation of SIP URI)
timeoutSec - Optional timeout in seconds for first party to answer. If no answer in the specified number of seconds, then the call will abort. A value of -1 signifies no timeout.
earlyMediaReinvite - Specifies whether or not the first party should receive a re-INVITE if the party returns an early media response.
Returns:
interface instance to control the click-to-dial session created by this method
Throws:
java.lang.Exception

init

protected void init(TransitionMachine machine)
             throws java.lang.Exception
This method is called immediately after new JavaToEChartsMachine instance is created. This method should be overridden in order to initialize subclass fields. Sets the value of the X-ECHARTS-UID, the NonSip controlPort, and the SIP app session ID used by the machine.

Overrides:
init in class JavaToEChartsMachine
Parameters:
machine - application machine instance associated with this instance's SIP application session
Throws:
java.lang.Exception

getUid

public java.lang.String getUid()
Return value of X-ECHARTS-UID header in INVITE to first party.

Returns:
Value of X-ECHARTS-UID header in INVITE to first party.

dropCalls

public void dropCalls()
               throws FeatureBoxException
Instruct Click2DialFlow4Machine to drop calls regardless of their respective states.

Throws:
FeatureBoxException - - if exception encountered sending DropCalls message to the Click2DialFlow4Machine

getApplicationSessionId

public java.lang.String getApplicationSessionId()
Return SIP application session ID associated with this interface instance.

Returns:
SIP application session ID associated with this interface instance.