org.echarts.servlet.sip.features.ucf
Class UCFServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.sip.SipServlet
          extended by org.echarts.servlet.sip.EChartsProxyServlet
              extended by org.echarts.servlet.sip.features.ucf.UCFServlet
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.servlet.Servlet, javax.servlet.ServletConfig, SipApplicationSessionListener

public class UCFServlet
extends EChartsProxyServlet
implements SipApplicationSessionListener

Servlet to unconditionally forward a call to a specfied URI. The forwarding URI value is obtained by calling the getForwardingURI() method of a UCFServletToJava interface implementation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.echarts.servlet.sip.EChartsProxyServlet
isRecordRoute, isSupervised, monitor
 
Fields inherited from class javax.servlet.sip.SipServlet
OUTBOUND_INTERFACES, PRACK_SUPPORTED, SIP_FACTORY, SIP_SESSIONS_UTIL, SUPPORTED, SUPPORTED_RFCs, TIMER_SERVICE
 
Constructor Summary
UCFServlet()
           
 
Method Summary
 void init(javax.servlet.ServletConfig config)
          Called when servlet instance created.
 void sessionCreated(SipApplicationSessionEvent ev)
          For SipApplicationSessionListener interface.
 void sessionDestroyed(SipApplicationSessionEvent ev)
          For SipApplicationSessionListener interface.
 void sessionExpired(SipApplicationSessionEvent sase)
          For SipApplicationSessionListener interface.
 void sessionReadyToInvalidate(SipApplicationSessionEvent ev)
          For SipApplicationSessionListener interface.
protected  URI specifyRequestURI(SipServletRequest request)
          Obtains forwarding URI from interface and continues the call.
 
Methods inherited from class org.echarts.servlet.sip.EChartsProxyServlet
destroy, doRequest, doResponse, getBooleanInitParameter, getMonitor, getServletProperties, handleInitialRequest, modifyRequest, modifyResponse, sendResponse
 
Methods inherited from class javax.servlet.sip.SipServlet
doAck, doBranchResponse, doBye, doCancel, doErrorResponse, doInfo, doInvite, doMessage, doNotify, doOptions, doPrack, doProvisionalResponse, doPublish, doRedirectResponse, doRefer, doRegister, doSubscribe, doSuccessResponse, doUpdate, log, log, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UCFServlet

public UCFServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Called when servlet instance created. Creates an instance of UCFServletToJava implementation used to obtain forwarding address for requests.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class EChartsProxyServlet
Throws:
javax.servlet.ServletException

specifyRequestURI

protected URI specifyRequestURI(SipServletRequest request)
Obtains forwarding URI from interface and continues the call. The headers and contents of the original request are copied to the forwarded request.

Overrides:
specifyRequestURI in class EChartsProxyServlet
Parameters:
request - initial request
Returns:
desired Request-URI, or null for no change

sessionCreated

public void sessionCreated(SipApplicationSessionEvent ev)
For SipApplicationSessionListener interface.

Specified by:
sessionCreated in interface SipApplicationSessionListener

sessionDestroyed

public void sessionDestroyed(SipApplicationSessionEvent ev)
For SipApplicationSessionListener interface.

Specified by:
sessionDestroyed in interface SipApplicationSessionListener

sessionExpired

public final void sessionExpired(SipApplicationSessionEvent sase)
For SipApplicationSessionListener interface. This is required as a work-around for SailFin bug. This method is enabled by setting the javaee:listener-class tag value in sip.xml, otherwise it will be ignored.

Specified by:
sessionExpired in interface SipApplicationSessionListener

sessionReadyToInvalidate

public void sessionReadyToInvalidate(SipApplicationSessionEvent ev)
For SipApplicationSessionListener interface.

Specified by:
sessionReadyToInvalidate in interface SipApplicationSessionListener