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

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

@ManagedData
@Description(value="RM and SC session information")
public class Session
extends 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.

Author:
Bhakti Mehta, Mike Grogan

Field Summary
static String SESSION_ID_KEY
          Well-known invocationProperty names
static String SESSION_KEY
           
 
Constructor Summary
protected Session()
           
  Session(SessionManager manager, String key, Object userData)
          Public constructor
 
Method Summary
 SecurityContextTokenInfo getSecurityInfo()
          Accessor for the securityInfo field.
 String getSessionKey()
          Accessor for Session Key.
 Object getUserData()
          Accessor for the userData field.
 void save()
          Saves the state of the session using whatever persistence mechanism the SessionManager offers.
 void setSecurityInfo(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 String SESSION_ID_KEY
Well-known invocationProperty names

See Also:
Constant Field Values

SESSION_KEY

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

Session

protected Session()

Session

public Session(SessionManager manager,
               String key,
               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

@ManagedAttribute
@Description(value="Session key")
public String getSessionKey()
Accessor for Session Key.


getUserData

public Object getUserData()
Accessor for the userData field.

Returns:
The value of the field.

getSecurityInfo

@ManagedAttribute
@Description(value="Security context token info")
public SecurityContextTokenInfo getSecurityInfo()
Accessor for the securityInfo field.


setSecurityInfo

public void setSecurityInfo(SecurityContextTokenInfo securityInfo)
Mutator for the securityInfo field.


save

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



Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.