org.echarts.servlet.sip.features.ccf
Class CCFServlet

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.ccf.CCFServlet
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.servlet.Servlet, javax.servlet.ServletConfig, SipApplicationSessionListener

public class CCFServlet
extends EChartsProxyServlet
implements SipApplicationSessionListener

Servlet to conditionally send a failure response for a call. The failure response code is obtained by calling the getFailureStatusCode()method of a CCFServletToJava 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
CCFServlet()
           
 
Method Summary
protected  boolean handleInitialRequest(SipServletRequest req)
          Queries interface for failure status code.
 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.
 
Methods inherited from class org.echarts.servlet.sip.EChartsProxyServlet
destroy, doRequest, doResponse, getBooleanInitParameter, getMonitor, getServletProperties, modifyRequest, modifyResponse, sendResponse, specifyRequestURI
 
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

CCFServlet

public CCFServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Called when servlet instance created. Creates an instance of CCFServletToJava implementation.

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

handleInitialRequest

protected boolean handleInitialRequest(SipServletRequest req)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Queries interface for failure status code. If failure status returned then send failure response to caller, otherwise let base class proxy the request.

Overrides:
handleInitialRequest in class EChartsProxyServlet
Parameters:
req - initial request
Returns:
Whether request handling is completed
Throws:
javax.servlet.ServletException
java.io.IOException

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