|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.commons.AbstractMOMRegistrationAware
com.sun.xml.ws.runtime.dev.SessionManager
@ManagedObject @Description(value="Session manager used by RM and SC") @AMXMetadata(type="WSRMSCSessionManager") public abstract class SessionManager
The SessionManager is used to obtain session information
This can be implemented using persistent storage mechanisms or using transient storage
Even if it is implemented using persistent storage the implementation should take care
of backing by a cache which will avoid the overhead of serialization and database
operations
Additionally the SessionManager is responsible for managing the life cycle
events for the sessions. It exposes methods to create and terminate the session
Periodically the SessionManager will check for sessions who have been inactive for
a predefined amount of time and then will terminate those sessions
| Field Summary | |
|---|---|
static String |
SESSION_THRESHOLD
|
static String |
TIMEOUT_INTERVAL
|
| Constructor Summary | |
|---|---|
SessionManager()
|
|
| Method Summary | |
|---|---|
abstract void |
addSecurityContext(String key,
IssuedTokenContext itctx)
Add the SecurityContext with key in local cache |
abstract Session |
createSession(String key)
Creates a Session with the given key, using an instance of java.util.Hashtable |
abstract Session |
createSession(String key,
Class clasz)
Creates a Session with the given key, using a new instance of the specified Class as a holder for user-defined data. |
abstract Session |
createSession(String key,
Object obj)
Creates a Session with the given key, using the specified Object as a holder for user-defined data. |
abstract Session |
createSession(String key,
SecurityContextTokenInfo sctInfo)
|
static Properties |
getConfig()
|
abstract IssuedTokenContext |
getSecurityContext(String key,
boolean checkExpiry)
Return the valid SecurityContext for matching key |
abstract Session |
getSession(String key)
Returns an existing session identified by the Key else null |
static SessionManager |
getSessionManager(WSEndpoint endpoint,
boolean isSC,
Properties props)
Returns the single instance of SessionManager Use the usual services mechanism to find implementing class. |
static SessionManager |
getSessionManager(WSEndpoint endpoint,
Properties props)
|
abstract Set<String> |
keys()
Returns the Set of valid Session keys. |
static void |
removeSessionManager(WSEndpoint endpoint)
|
abstract void |
saveSession(String key)
Saves the state of the Session with the given key. |
protected abstract Collection<Session> |
sessions()
|
static void |
setConfig(Properties aConfig)
|
abstract void |
terminateSession(String key)
Removed the Session with the given key. |
| Methods inherited from class com.sun.xml.ws.commons.AbstractMOMRegistrationAware |
|---|
isRegisteredAtMOM, setRegisteredAtMOM |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TIMEOUT_INTERVAL
public static final String SESSION_THRESHOLD
| Constructor Detail |
|---|
public SessionManager()
| Method Detail |
|---|
public static Properties getConfig()
public static void setConfig(Properties aConfig)
aConfig - the config to setpublic abstract Session getSession(String key)
key - The Session key.@ManagedAttribute @Description(value="The set of valid Session keys") public abstract Set<String> keys()
@ManagedAttribute @Description(value="The collection of valid Sessions") protected abstract Collection<Session> sessions()
public abstract void terminateSession(String key)
key - The key of the Session to be removed.
public abstract Session createSession(String key,
Class clasz)
key - The Session key to be used.
public abstract Session createSession(String key,
Object obj)
key - The Session key to be used.obj - The object to use as a holder for user data in the session.
public abstract Session createSession(String key,
SecurityContextTokenInfo sctInfo)
public abstract Session createSession(String key)
key - The Session key to be used.public abstract void saveSession(String key)
key - The key of the session to be saved
public abstract IssuedTokenContext getSecurityContext(String key,
boolean checkExpiry)
key - The key of the security context to be lookedexpiryCheck - indicates whether to check the token expiry or not,
As in case of renew we don't need to check token expiry
public abstract void addSecurityContext(String key,
IssuedTokenContext itctx)
key - The key of the security context to be storeditctx - The IssuedTokenContext to be storedpublic static void removeSessionManager(WSEndpoint endpoint)
public static SessionManager getSessionManager(WSEndpoint endpoint,
boolean isSC,
Properties props)
com.sun.xml.ws.runtime.util.SessionManager
by default.
manager field.
public static SessionManager getSessionManager(WSEndpoint endpoint,
Properties props)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||