org.echarts.servlet.sip.features.registrar
Class RegistrarServlet

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.registrar.RegistrarServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RegistrarServlet
extends EChartsProxyServlet

A reusable SIP registrar feature (ref: RFC 3261 sec 10.3). This feature only supports one contact address per address of record. The contact address associated with the most recent registration is maintained. There are a number of other requirements specified in the RFC that are not implemented yet. See the comments in the code for details.

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
RegistrarServlet()
           
 
Method Summary
protected  boolean handleInitialRequest(SipServletRequest req)
          Override handleInitialRequest to customize handling of initial requests.
 void init(javax.servlet.ServletConfig config)
          Initialize the servlet and monitor.
 
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

RegistrarServlet

public RegistrarServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Description copied from class: EChartsProxyServlet
Initialize the servlet and monitor.

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
Description copied from class: EChartsProxyServlet
Override handleInitialRequest to customize handling of initial requests. If this methods returns true, it signifies that the request handling is complete, and the calling method doRequest returns immediately.

This allows the subclass to perform alternative action in handleInitialRequest, for example to act as UAS and send a final response, or set a timer to handle the request later.

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