Package com.sun.xml.ws.runtime.dev
Class SessionManagerImpl
java.lang.Object
com.sun.xml.ws.commons.AbstractMOMRegistrationAware
com.sun.xml.ws.runtime.dev.SessionManager
com.sun.xml.ws.runtime.dev.SessionManagerImpl
- All Implemented Interfaces:
com.sun.xml.ws.commons.MOMRegistrationAware
In memory implementation of
SessionManager- Author:
- Mike Grogan
-
Field Summary
Fields inherited from class com.sun.xml.ws.runtime.dev.SessionManager
SESSION_THRESHOLD, TIMEOUT_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionSessionManagerImpl(com.sun.xml.ws.api.server.WSEndpoint endpoint, boolean isSC) Creates a new instance of SessionManagerImplSessionManagerImpl(com.sun.xml.ws.api.server.WSEndpoint endpoint, boolean isSC, Properties config) Creates a new instance of SessionManagerImpl -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSecurityContext(String key, com.sun.xml.ws.security.IssuedTokenContext itctx) Add the SecurityContext with key in local cachecreateSession(String key) Creates a Session with the given key, using an instance of synchronizedjava.util.Map<String, String>a sa holder for user-defined data.createSession(String key, com.sun.xml.ws.security.SecurityContextTokenInfo sctInfo) 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.createSession(String key, Object obj) Creates a Session with the given key, using the specified Object as a holder for user-defined data.com.sun.xml.ws.security.IssuedTokenContextgetSecurityContext(String key, boolean checkExpiry) Return the valid SecurityContext for matching keygetSession(String key) Returns an existing session identified by the Key else nullkeys()Returns the Set of valid Session keys.voidsaveSession(String key) Does nothing in this implementation.protected Collection<Session>sessions()voidterminateSession(String key) Removed the Session with the given key.Methods inherited from class com.sun.xml.ws.runtime.dev.SessionManager
getConfig, getSessionManager, getSessionManager, removeSessionManager, setConfigMethods inherited from class com.sun.xml.ws.commons.AbstractMOMRegistrationAware
isRegisteredAtMOM, setRegisteredAtMOM
-
Constructor Details
-
SessionManagerImpl
public SessionManagerImpl(com.sun.xml.ws.api.server.WSEndpoint endpoint, boolean isSC) Creates a new instance of SessionManagerImpl -
SessionManagerImpl
public SessionManagerImpl(com.sun.xml.ws.api.server.WSEndpoint endpoint, boolean isSC, Properties config) Creates a new instance of SessionManagerImpl
-
-
Method Details
-
getSession
Returns an existing session identified by the Key else null- Specified by:
getSessionin classSessionManager- Parameters:
key- The Session key.- Returns:
- The Session with the given key.
nullif none exists.
-
keys
Returns the Set of valid Session keys.- Specified by:
keysin classSessionManager- Returns:
- The Set of keys.
-
sessions
- Specified by:
sessionsin classSessionManager- Returns:
- The Collection of valid Sessions.
-
terminateSession
Removed the Session with the given key.- Specified by:
terminateSessionin classSessionManager- Parameters:
key- The key of the Session to be removed.
-
createSession
Creates a Session with the given key, using a new instance of the specified Class as a holder for user-defined data. The specified Class must have a default constructor.- Specified by:
createSessionin classSessionManager- Parameters:
key- The Session key to be used.- Returns:
- The new Session..
nullif the given class cannot be instantiated.
-
createSession
Creates a Session with the given key, using the specified Object as a holder for user-defined data.- Specified by:
createSessionin classSessionManager- Parameters:
key- The Session key to be used.obj- The object to use as a holder for user data in the session.- Returns:
- The new Session.
-
createSession
- Specified by:
createSessionin classSessionManager
-
createSession
Creates a Session with the given key, using an instance of synchronizedjava.util.Map<String, String>a sa holder for user-defined data.- Specified by:
createSessionin classSessionManager- Parameters:
key- The Session key to be used.- Returns:
- The new Session.
-
saveSession
Does nothing in this implementation.- Specified by:
saveSessionin classSessionManager- Parameters:
key- The key of the session to be saved
-
getSecurityContext
public com.sun.xml.ws.security.IssuedTokenContext getSecurityContext(String key, boolean checkExpiry) Return the valid SecurityContext for matching key- Specified by:
getSecurityContextin classSessionManager- Parameters:
key- The key of the security context to be lookedcheckExpiry- indicates whether to check the token expiry or not, As in case of renew we don't need to check token expiry- Returns:
- IssuedTokenContext for security context key
-
addSecurityContext
Add the SecurityContext with key in local cache- Specified by:
addSecurityContextin classSessionManager- Parameters:
key- The key of the security context to be storeditctx- The IssuedTokenContext to be stored
-