com.ibm.websphere.servlet.session

Interface IBMApplicationSession


  1. public interface IBMApplicationSession
The IBMApplicationSession interface is used for SIP/HTTP Converged Applications as well as for sharing session data in http applications. HTTP Servlets can call session.getIBMApplicationSession, whereas SIP Servlets call session.getApplicationSession. In a converged application, both of these calls will return the same SipApplicationSession object.

Method Summary

Modifier and Type Method and Description
  1. void
encodeURI(java.lang.Object URI)
Encodes the ID of this IBMApplicationSession into the specified SIP URI.
  1. java.lang.String
encodeURI(java.lang.String URI)
Encodes the ID of this IBMApplicationSession into the specified HTTP URI.
  1. java.lang.Object
getAttribute(java.lang.String name)
Returns the object bound with the specified name in this session, or null if no object is bound under the name.
  1. java.util.Iterator
getAttributeNames()
Returns an Iterator over the String objects containing the names of all the objects bound to this session.
  1. long
getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
  1. java.lang.String
getId()
Returns a string containing the unique identifier assigned to this session.
  1. long
getLastAccessedTime()
Returns the last time an event occurred on this application session.
  1. java.util.Iterator
getSessions()
Returns an Iterator over all "protocol" sessions associated with this application session.
  1. java.util.Iterator
getSessions(java.lang.String protocol)
Returns an Iterator over the "protocol" session objects associated of the specified protocol associated with this application session.
  1. java.util.Collection
getTimers()
Returns all active timers associated with this application session.
  1. void
invalidate()
Invalidates this application session.
  1. void
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session.
  1. void
setAttribute(java.lang.String name,java.lang.Object attribute)
Binds an object to this session, using the name specified.
  1. int
setExpires(int deltaMinutes)
Sets the time of expiry for this application session.
  1. void
sync()
Forces replication of application session changes

Method Detail

encodeURI

  1. void encodeURI(java.lang.Object URI)
Encodes the ID of this IBMApplicationSession into the specified SIP URI.
Parameters:
URI - object expected to be an instance of javax.servlet.sip.URI

encodeURI

  1. java.lang.String encodeURI(java.lang.String URI)
Encodes the ID of this IBMApplicationSession into the specified HTTP URI.
Parameters:
URI - string representation of the http uri
Returns:
string with encoded application session id added

getAttribute

  1. java.lang.Object getAttribute(java.lang.String name)
Returns the object bound with the specified name in this session, or null if no object is bound under the name.
Parameters:
name - name of the attribute to retrieve

getAttributeNames

  1. java.util.Iterator getAttributeNames( )
Returns an Iterator over the String objects containing the names of all the objects bound to this session.

getCreationTime

  1. long getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.

getId

  1. java.lang.String getId()
Returns a string containing the unique identifier assigned to this session.

getLastAccessedTime

  1. long getLastAccessedTime()
Returns the last time an event occurred on this application session.

getSessions

  1. java.util.Iterator getSessions( )
Returns an Iterator over all "protocol" sessions associated with this application session.

getSessions

  1. java.util.Iterator getSessions( java.lang.String protocol)
Returns an Iterator over the "protocol" session objects associated of the specified protocol associated with this application session.
Parameters:
protocol - string representation of protocol, either "SIP" or "HTTP"

getTimers

  1. java.util.Collection getTimers( )
Returns all active timers associated with this application session.

invalidate

  1. void invalidate()
Invalidates this application session.

removeAttribute

  1. void removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session.
Parameters:
name - name of the attribute to remove

setAttribute

  1. void setAttribute(java.lang.String name,
  2. java.lang.Object attribute)
Binds an object to this session, using the name specified.
Parameters:
name - name of the attribute to set
attribute - value of the attribute to set

setExpires

  1. int setExpires(int deltaMinutes)
Sets the time of expiry for this application session.
Parameters:
deltaMinutes - the number of minutes that the lifetime of this IBMApplicationSession is extended
Returns:
actual number of minutes the lifetime of this session is extended, or 0 if it wasn't extended

sync

  1. void sync()
Forces replication of application session changes