SipApplicationSessionListener
The SipApplicationSessionListener interface allows implementations to receive notifications about the lifecycle events of SipApplicationSession objects within a SIP application. Specifically, it provides notifications for session invalidation and activation events.
To receive these events, the implementation class must be configured in the SIP application’s deployment descriptor (sip.xml). This enables the listener to monitor and react to changes in the application session’s lifecycle, such as performing cleanup on invalidation or restoring state during activation.
Methods:
sessionCreated
void sessionCreated(SipApplicationSessionEvent ev)
This method is called when a new SipApplicationSession is created. It provides an opportunity for the application to perform initialization or logging related to the session.
Parameters:
ev: The SipApplicationSessionEvent associated with the created session.
sessionDestroyed
void sessionDestroyed(SipApplicationSessionEvent ev)
This method is called when a SipApplicationSession is invalidated, either due to a timeout or explicit invalidation. Applications cannot extend the lifetime of the session during this callback.
Parameters:
ev: The SipApplicationSessionEvent associated with the invalidated session.
sessionExpired
void sessionExpired(SipApplicationSessionEvent ev)
This method is called when a SipApplicationSession has expired. During this callback, the application can request an extension of the session's lifetime by invoking SipApplicationSession.setExpires(int).
Parameters:
ev: The SipApplicationSessionEvent associated with the expired session.
sessionReadyToInvalidate
void sessionReadyToInvalidate(SipApplicationSessionEvent ev)
This method is called when a SipApplicationSession enters the ready-to-invalidate state. Unless the listener calls SipApplicationSession.setInvalidateWhenReady(false), the container will invalidate the session after this callback.
Parameters:
ev: The SipApplicationSessionEvent associated with the session ready to be invalidated.
Start innovating with Mobius
What's next? Let's talk!