org.echarts.servlet.sip
Class EChartsSipServletMachine

java.lang.Object
  extended by org.echarts.Machine
      extended by org.echarts.StateMachine
          extended by org.echarts.TransitionMachine
              extended by org.echarts.servlet.sip.EChartsSipServletMachine
All Implemented Interfaces:
java.io.Serializable


public abstract class EChartsSipServletMachine
extends TransitionMachine

A subclass of org.echarts.TransitionMachine containing methods specific to ECharts for SIP Servlet. Application code may extends this class and override specific methods to customize behavior as needed.

See Also:
Serialized Form

Field Summary
 
Constructor Summary
 
Method Summary
static Request createRequest(SipServletRequest req, Monitor monitor)
          Factory method to create an object of a specific subclass of Request to wrap a SipServletRequest that is dispatched to the application.
static Response createResponse(SipServletResponse resp, Monitor monitor)
          Factory method to create an object of a specific subclass of Response to wrap a SipServletResponse that is dispatched to the application.
static void servletInit(javax.servlet.ServletConfig config)
          Called when the Servlet.init() is called by the container.
static java.lang.String sessionKeyFromRequest(SipServletRequest req, Monitor monitor)
          Generate the key used for key based session targeting mechanism.
 
Methods inherited from class org.echarts.TransitionMachine
addMessagelessTransition, addMessageTransition, globalStateString, globalStateString, initializeMessagelessTransitions, initializeMessageTransitions, initializeRoot, localStateString, localStateString, removePort, run, run, runNoQueueing
 
Methods inherited from class org.echarts.StateMachine
setMachineDebugging, setMachineMonitor, setMachineMonitoring
 
Methods inherited from class org.echarts.Machine
getDefaultMachineDebugging, getDefaultMachineDebuggingGlobalStateOutput, getDefaultMachineMonitor, getDefaultMachineMonitorFilter, getDefaultMachineMonitoring, getMachineDebugging, getMachineDebuggingGlobalStateOutput, getMachineID, getMachineIndex, getMachineMonitor, getMachineMonitoring, getParentMachine, getRootMachine, getSystemDebugging, getSystemMonitoring, putEvent, setDebugging, setDefaultMachineDebugging, setDefaultMachineDebuggingGlobalStateOutput, setDefaultMachineMonitor, setDefaultMachineMonitorFilter, setDefaultMachineMonitoring, setMachineDebuggingGlobalStateOutput, setSystemDebugging, setSystemMonitoring, statePathString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail
Method Detail

sessionKeyFromRequest

public static java.lang.String sessionKeyFromRequest(SipServletRequest req,
                                                     Monitor monitor)
Generate the key used for key based session targeting mechanism.

This is only called if the top-level machine implements BoundBoxMachine. The default behavior is to return the String representation of the subscriber URI. An application may define this method in its top-level machine class to customize how the key is generated.

Parameters:
req - initial request that the Application Router has selected this application to handle
monitor - the monitor that can be used to log messages
Returns:
the key

createRequest

public static Request createRequest(SipServletRequest req,
                                    Monitor monitor)
Factory method to create an object of a specific subclass of Request to wrap a SipServletRequest that is dispatched to the application.

An application may define this method in its top-level machine class to create application-specific subclasses.

Parameters:
req - the request that is dispatched to the application
monitor - the monitor that can be used to log messages
Returns:
an object of the specific subclass of Request

createResponse

public static Response createResponse(SipServletResponse resp,
                                      Monitor monitor)
Factory method to create an object of a specific subclass of Response to wrap a SipServletResponse that is dispatched to the application.

An application may define this method in its top-level machine class to create application-specific subclasses.

Parameters:
resp - the response that is dispatched to the application
monitor - the monitor that can be used to log messages
Returns:
an object of the specific subclass of Response

servletInit

public static void servletInit(javax.servlet.ServletConfig config)
Called when the Servlet.init() is called by the container. The application can perform application-specific initialization which should only be run once per application (i.e. a servlet instance) in this method. This is in contrast to the constructor method of the top-level machine class, which is executed once per application instance.

Parameters:
config - a ServletConfig object container the servlet's configuration and initialization parameters