The SIP Servlet Tutorial

SIP Listeners

SIP application listeners are Java servlet application listeners that listen for SIP-specific events. SIP applications implement the SIP event listener interfaces by marking the implementation class with a javax.servlet.sip.annotation.SipListener annotation.


Example 1–8 Example of @SipListener

@SipListener
public class MyListener implements SipServletListener {
	...
}

Sip servlet classes may also implement the SIP event listener interfaces.


Example 1–9 Example of SIP Listener in SIP Servlet Class

@SipListener
@SipServlet
public class MySipServlet extends SipServlet implements SipServletListener {
	...
}

SIP Servlet Listeners

The following SIP servlet listeners, in package javax.servlet.sip, are available to SIP servlet developers:

Table 1–10 SIP Servlet Listeners

Listener 

Description 

SipServletListener

Implementations of SipServletListener receive notifications on initialization of SipServlet instances. See the SIP Servlet 1.1 Javadocs for more information.

SIP Application Session Listeners

The following SIP application listeners, in package javax.servlet.sip, are available to SIP servlet developers:

Table 1–11 SIP Application Listeners

Listener 

Description 

SipApplicationSessionListener

Implementations of SipApplicationSessionListener receive notifications when SipApplicationSession instances have been created, destroyed, timed out, or are ready to be invalidated. See the SIP Servlet 1.1 Javadocs for more information.

SipApplicationSessionAttributeListener

Implementations of SipApplicationSessionAttributeListener receive notifications when attributes are added, removed, or modified in SipApplicationSession instances. See the SIP Servlet 1.1 Javadocs for more information.

SipApplicationSessionBindingListener

Session attributes that implement SipApplicationSessionBindingListener receive notifications when they are bound or unbound to SipApplicationSession instances. See the SIP Servlet 1.1 Javadocs for more information.

SipApplicationSessionActivationListener

Implementations of SipApplicationSessionActivationListener receive notifications when SipApplicationSession instances are activated or passivated. See the SIP Servlet 1.1 Javadocs for more information.

SIP Session Listeners

The following SIP session listeners, in package javax.servlet.sip, are available to SIP servlet developers:

Table 1–12 SIP Session Listeners

Listener 

Description 

SipSessionListener

Implementations of SipSessionListener receive notifications when SipSession instances are created, destroyed, or ready to be invalidated. See the SIP Servlet 1.1 Javadocs for more information.

SipSessionActivationListener

Implementations of SipSessionActivationListener receive notifications when SipSession instances are activated or passivated. See the SIP Servlet 1.1 Javadocs for more information.

SipSessionAttributeListener

Implementations of SipSessionAttributeListener receive notifications when attributes are added, removed, or modified in SipSession instances. See the SIP Servlet 1.1 Javadocs for more information.

SipSessionBindingListener

Attributes that implement SipSessionBindingListener receive notifications when they are bound or unbound from SipSession instances. See the SIP Servlet 1.1 Javadocs for more information.

SIP Error Listeners

The following SIP error listeners, in package javax.servlet.sip, are available to SIP servlet developers:

Table 1–13 SIP Error Listeners

Listener 

Description 

SipErrorListener

Implementations of SipErrorListener receive notifications when an expected ACK or PRACK SIP message is not received. See the SIP Servlet 1.1 Javadocs for more information.

SIP Timer Listeners

The following SIP timer listeners, in package javax.servlet.sip, are available to SIP servlet developers:

Table 1–14 SIP Timer Listeners

Listener 

Description 

TimerListener

Implementations of TimerListener receive notifications when ServletTimer instances have fired. See the SIP Servlet 1.1 Javadocs for more information.

For information on SIP timers, see SIP Timers.