|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.sip.SipServlet
public abstract class SipServlet
Provides an abstract class to be subclassed to create a SIP servlet. This class receives incoming messages through the service method. This method calls doRequest or doResponse for incoming requests and responses, respectively. These two methods in turn dispatch on request method or status code to one of the following methods: doInvite - for SIP INVITE requests doAck - for SIP ACK requests doOptions - for SIP OPTIONS requests doBye - for SIP BYE requests doCancel - for SIP CANCEL requests doRegister - for SIP REGISTER requests doSubscribe - for SIP SUBSCRIBE requests doNotify - for SIP NOTIFY requests doMessage - for SIP MESSAGE requests doInfo - for SIP INFO requests doPrack - for SIP PRACK requests doUpdate - for SIP UPDATE requests doRefer - for SIP REFER requests doPublish - for SIP PUBLISH requests doProvisionalResponse - for SIP 1xx informational responses doSuccessResponse - for SIP 2xx responses doRedirectResponse - for SIP 3xx responses doErrorResponse - for SIP 4xx, 5xx, and 6xx responses The default implementation of doAck, doCancel and all the response handling methods are empty. All other request handling methods reject the request with a 500 error response. Subclasses of SipServlet will usually override one or more of these methods. See Also:RFC 2976, The SIP INFO Method, RFC 3262, Reliability of Provisional Responses in the Session Initiation Protocol (SIP), RFC 3265, Session Initiation Protocol (SIP)-Specific Event Notification, SIP Extensions for Instant Messaging, Serialized Form
| Field Summary | |
|---|---|
static String |
OUTBOUND_INTERFACES
The string "javax.servlet.sip.outboundInterfaces". |
static String |
PRACK_SUPPORTED
Deprecated. in favor of using the "javax.servlet.sip.supported" attribute The string "javax.servlet.sip.100rel". This is the name of the ServletContext attribute whose value suggests whether the container supports the 100rel extension i.e. RFC 3262. |
static String |
SIP_FACTORY
The string "javax.servlet.sip.SipFactory". |
static String |
SIP_SESSIONS_UTIL
The string "javax.servlet.sip.Sessions". |
static String |
SUPPORTED
The string "javax.servlet.sip.supported". |
static String |
SUPPORTED_RFCs
The string "javax.servlet.sip.supportedRfcs". |
static String |
TIMER_SERVICE
The string "javax.servlet.sip.TimerService". |
| Constructor Summary | |
|---|---|
SipServlet()
|
|
| Method Summary | |
|---|---|
protected void |
doAck(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming ACK requests. |
protected void |
doBranchResponse(SipServletResponse resp)
Invoked by the server to handle intermediate final responses only if this Servlet behaves as a proxy. |
protected void |
doBye(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming BYE requests. |
protected void |
doCancel(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming CANCEL requests. |
protected void |
doErrorResponse(SipServletResponse resp)
Invoked by the server (via the doResponse method) to handle incoming 4xx - 6xx class responses. |
protected void |
doInfo(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming INFO requests. |
protected void |
doInvite(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming INVITE requests. |
protected void |
doMessage(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming MESSAGE requests. |
protected void |
doNotify(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming NOTIFY requests. |
protected void |
doOptions(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming OPTIONS requests. |
protected void |
doPrack(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming PRACK requests. |
protected void |
doProvisionalResponse(SipServletResponse resp)
Invoked by the server (via the doResponse method) to handle incoming 1xx class responses. |
protected void |
doPublish(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming PUBLISH requests. |
protected void |
doRedirectResponse(SipServletResponse resp)
Invoked by the server to notify the servlet of incoming 3xx class responses. |
protected void |
doRefer(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming REFER requests. |
protected void |
doRegister(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming REGISTER requests. |
protected void |
doRequest(SipServletRequest req)
Invoked to handle incoming requests. |
protected void |
doResponse(SipServletResponse resp)
Invoked to handle incoming responses. |
protected void |
doSubscribe(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming SUBSCRIBE requests. |
protected void |
doSuccessResponse(SipServletResponse resp)
Invoked by the server (via the doResponse method) to handle incoming 2xx class responses. |
protected void |
doUpdate(SipServletRequest req)
Invoked by the server (via the service method) to handle incoming UPDATE requests. |
void |
log(String message)
Writes the specified message to a servlet log file. |
void |
log(String message,
Throwable t)
Writes an explanatory message and a stack trace for a given Throwable exception to the servlet log file. |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
Invoked to handle incoming SIP messages: requests or responses. |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OUTBOUND_INTERFACES
public static final String SIP_FACTORY
public static final String SIP_SESSIONS_UTIL
public static final String SUPPORTED
public static final String SUPPORTED_RFCs
public static final String PRACK_SUPPORTED
public static final String TIMER_SERVICE
| Constructor Detail |
|---|
public SipServlet()
| Method Detail |
|---|
protected void doAck(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doBranchResponse(SipServletResponse resp)
throws javax.servlet.ServletException,
IOException
resp - the response object
javax.servlet.ServletException - if an exception occurs that interferes with the servlet's normal operation
IOException - if an input or output exception occurs
protected void doBye(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doCancel(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doErrorResponse(SipServletResponse resp)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doInfo(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doInvite(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doMessage(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doNotify(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doOptions(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doPrack(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doProvisionalResponse(SipServletResponse resp)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doPublish(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doRedirectResponse(SipServletResponse resp)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doRefer(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doRegister(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doRequest(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doResponse(SipServletResponse resp)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doSubscribe(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doSuccessResponse(SipServletResponse resp)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
protected void doUpdate(SipServletRequest req)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOExceptionpublic void log(String message)
log in class javax.servlet.GenericServlet
public void log(String message,
Throwable t)
log in class javax.servlet.GenericServlet
public void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
throws javax.servlet.ServletException,
IOException
service in interface javax.servlet.Servletservice in class javax.servlet.GenericServletjavax.servlet.ServletException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||