|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.sip.SipServlet org.echarts.servlet.sip.EChartsProxyServlet org.echarts.servlet.sip.features.proxyRequest.ProxyRequestServlet
public class ProxyRequestServlet
Servlet to conditionally proxy a request. This servlet subsumes the functionality of CCFServlet (conditional call forwarding) and UCFServlet (unconditional call failure). When a request is received, the servlet calls the getProxyRequestResponse() method of its ProxyRequestServletToJava interface implementation. If the method returns null then the request is forwarded unchanged. If the method returns an integer failure status code, then the associated failure response is returned to the caller. If the method returns a URI, then the request is forwarded to that URI. This feature is intended to be used as a non-record-route proxy and therefore does not include facilities for overriding the container's default strategy for session invalidation.
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 | |
---|---|
ProxyRequestServlet()
|
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. |
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)
Returns SipURI value returned by call to getProxyRequestResponse() by handleInitialRequest(). |
Methods inherited from class org.echarts.servlet.sip.EChartsProxyServlet |
---|
destroy, doRequest, doResponse, getBooleanInitParameter, getMonitor, getServletProperties, 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 |
---|
public ProxyRequestServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
EChartsProxyServlet
init
in interface javax.servlet.Servlet
init
in class EChartsProxyServlet
javax.servlet.ServletException
protected boolean handleInitialRequest(SipServletRequest req) throws javax.servlet.ServletException, java.io.IOException
EChartsProxyServlet
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.
handleInitialRequest
in class EChartsProxyServlet
req
- initial request
javax.servlet.ServletException
java.io.IOException
protected URI specifyRequestURI(SipServletRequest request)
specifyRequestURI
in class EChartsProxyServlet
request
- initial request
public void sessionCreated(SipApplicationSessionEvent ev)
sessionCreated
in interface SipApplicationSessionListener
public void sessionDestroyed(SipApplicationSessionEvent ev)
sessionDestroyed
in interface SipApplicationSessionListener
public final void sessionExpired(SipApplicationSessionEvent sase)
sessionExpired
in interface SipApplicationSessionListener
public void sessionReadyToInvalidate(SipApplicationSessionEvent ev)
sessionReadyToInvalidate
in interface SipApplicationSessionListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |