com.sun.xml.ws.runtime.util
Class Session

java.lang.Object
  extended by com.sun.xml.ws.runtime.util.Session

public class Session
extends java.lang.Object

The Session object is used to manage state between multiple requests from the same client. It contains a session key field to uniquely identify the Session, a SecurityInfo field that contains the security parameters used to protect the session and userdata field that can store the state for multiple requests from the client.


Field Summary
static java.lang.String SESSION_ID_KEY
          Well-known invocationProperty names
static java.lang.String SESSION_KEY
           
 
Constructor Summary
Session(SessionManager manager, java.lang.String key, java.lang.Object userData)
          Public constructor
 
Method Summary
 long getCreationTime()
          Accessor for creation time.
 long getLastAccessedTime()
          Accessor for lastAccessed time, which can be used to invalidate Sessions have not been active since a certain time.
 com.sun.xml.ws.security.SecurityContextTokenInfo getSecurityInfo()
          Accessor for the securityInfo field.
 java.lang.String getSessionKey()
          Accessor for Session Key.
 java.lang.Object getUserData()
          Accessor for the userData field.
 void resetLastAccessedTime()
          Resets the lastAccessedTime to the current time.
 void save()
          Saves the state of the session using whatever persistence mechanism the SessionManager offers.
 void setSecurityInfo(com.sun.xml.ws.security.SecurityContextTokenInfo securityInfo)
          Mutator for the securityInfo field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_ID_KEY

public static final java.lang.String SESSION_ID_KEY
Well-known invocationProperty names

See Also:
Constant Field Values

SESSION_KEY

public static final java.lang.String SESSION_KEY
See Also:
Constant Field Values
Constructor Detail

Session

public Session(SessionManager manager,
               java.lang.String key,
               java.lang.Object userData)
Public constructor

Parameters:
manager - - A SessionManager that can handle Sessions of this type.
key - - The unique session id
data - - Holder for user-defined data.
Method Detail

getSessionKey

public java.lang.String getSessionKey()
Accessor for Session Key.


getUserData

public java.lang.Object getUserData()
Accessor for the userData field.

Returns:
The value of the field.

getSecurityInfo

public com.sun.xml.ws.security.SecurityContextTokenInfo getSecurityInfo()
Accessor for the securityInfo field.


setSecurityInfo

public void setSecurityInfo(com.sun.xml.ws.security.SecurityContextTokenInfo securityInfo)
Mutator for the securityInfo field.


getCreationTime

public long getCreationTime()
Accessor for creation time.


getLastAccessedTime

public long getLastAccessedTime()
Accessor for lastAccessed time, which can be used to invalidate Sessions have not been active since a certain time.


resetLastAccessedTime

public void resetLastAccessedTime()
Resets the lastAccessedTime to the current time.


save

public void save()
Saves the state of the session using whatever persistence mechanism the SessionManager offers.