The SIP Servlet Tutorial

Using SipFactory to Create SIP Servlet Instances

The javax.servlet.sip.SipFactory interface defines several abstractions useful in SIP applications. SIP applications use the container's SipFactory instance to create :

For a full description of SipFactory's methods, see the SIP Servlet 1.1 Javadocs.

Use the javax.annotations.Resource annotation to inject an instance of SipFactory in a class.

Example 1–4 Injecting an Instance of SipFactory into a Class

SipFactor sf;

You may also look up the container's SipFactory instance through the servlet context.

Example 1–5 Looking Up SipFactory

SipFactory sf = 
		(SipFactory) getServletContext().getAttribute("javax.servlet.sip.SipFactory");