@ManagedObject @Description(value="Session manager used by RM and SC") @AMXMetadata(type="WSRMSCSessionManager") public abstract class SessionManager extends AbstractMOMRegistrationAware
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
| Modifier and Type | Field and Description |
|---|---|
static String |
SESSION_THRESHOLD |
static String |
TIMEOUT_INTERVAL |
| Constructor and Description |
|---|
SessionManager() |
| Modifier and Type | Method and Description |
|---|---|
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(com.sun.xml.ws.api.server.WSEndpoint endpoint,
boolean isSC,
Properties props)
Returns the single instance of SessionManager
Use the usual services mechanism to find implementing class.
|
static SessionManager |
getSessionManager(com.sun.xml.ws.api.server.WSEndpoint endpoint,
Properties props) |
abstract Set<String> |
keys()
Returns the Set of valid Session keys.
|
static void |
removeSessionManager(com.sun.xml.ws.api.server.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.
|
isRegisteredAtMOM, setRegisteredAtMOMpublic static final String TIMEOUT_INTERVAL
public static final String SESSION_THRESHOLD
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 savedpublic 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 expirypublic 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(com.sun.xml.ws.api.server.WSEndpoint endpoint)
public static SessionManager getSessionManager(com.sun.xml.ws.api.server.WSEndpoint endpoint, boolean isSC, Properties props)
com.sun.xml.ws.runtime.util.SessionManager
by default.manager field.public static SessionManager getSessionManager(com.sun.xml.ws.api.server.WSEndpoint endpoint, Properties props)
Copyright © 2005–2017 Oracle Corporation. All rights reserved.