The SIP Servlet Tutorial

SipApplicationSession Lifecycle Methods

The following table lists the methods defined in SipApplicationSession for managing the SIP application session lifecycle:

Table 1–9 SipApplicationSession Lifecycle Methods

Method 

Description 

getCreationTime()

Returns the time that the SipApplicationSession instance was created as a long value representing the number of milliseconds since midnight January 1, 1970 GMT.

getExpirationTime()

Returns the time that the SipApplicationSession will expire as a long value representing the number of milliseconds since midnight January 1, 1970 GMT.

getInvalidateWhenReady()

Returns a boolean value specifying whether the container will notify the application when the SipApplicationSession instance is ready to be invalidated.

getLastAccessedTime()

Returns the time that the SipApplicationSession instance was last accessed as a long value representing the number of milliseconds since midnight January 1, 1970 GMT.

setInvalidateWhenReady(boolean invalidateWhenReady)

Tells the container to notify the application when the SipApplicationSession instance is ready to be invalidated.

invalidate()

Explicitly invalidates the SIP application session and unbinds any objects bound to the session. 

isReadyToInvalidate()

Returns a boolean value specifying whether the SipApplicationSession instance is ready to be invalidated.

isValid()

Returns a boolean value specifying whether the SipApplicationSession instance is valid.

setExpires(int deltaMinutes)

Extends the time of expiry for the SipApplicationSession instance by the number of minutes specified by deltaMinutes. If deltaMinutes is 0 or a negative number, the session will never expire. Returns an int value of the number of minutes by which the session was extended. If it returns 0, the session was not extended.