The SIP Servlet Tutorial

Using the @SipServlet Annotation

The javax.servlet.sip.annotation.SipServlet class-level annotation is used to mark the class as a SIP servlet.


Example 1–1 Example of the @SipServlet Annotation

@SipServlet
public class MyServlet extends SipServlet {
	...
}

@SipServlet has the following elements:

Table 1–3 @SipServlet Elements

Element 

Description 

applicationName

Explicitly associates the SIP servlet with a particular SIP application. This element is optional. 

description

An optional description of this SIP servlet. 

loadOnStartup

An int value representing the order this SIP servlet should be loaded on application deployment. The default value is -1, meaning the SIP servlet will not load until the container receives a request that the servlet handles. The lower the non-negative integer value in loadOnStartup, the earlier the SIP servlet will be initialized.

name

An optional name for this SIP servlet.