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:
MOMRegistrationAware
public class SessionManagerImpl extends SessionManager
In memory implementation ofSessionManager- Author:
- Mike Grogan
-
-
Field Summary
-
Fields inherited from class com.sun.xml.ws.runtime.dev.SessionManager
SESSION_THRESHOLD, TIMEOUT_INTERVAL
-
-
Constructor Summary
Constructors Constructor Description SessionManagerImpl(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSecurityContext(String key, IssuedTokenContext itctx)Add the SecurityContext with key in local cacheSessioncreateSession(String key)Creates a Session with the given key, using an instance of synchronized java.util.Mapa sa holder for user-defined data. SessioncreateSession(String key, SecurityContextTokenInfo sctInfo)SessioncreateSession(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.SessioncreateSession(String key, Object obj)Creates a Session with the given key, using the specified Object as a holder for user-defined data.IssuedTokenContextgetSecurityContext(String key, boolean checkExpiry)Return the valid SecurityContext for matching keySessiongetSession(String key)Returns an existing session identified by the Key else nullSet<String>keys()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, setConfig
-
Methods inherited from class com.sun.xml.ws.commons.AbstractMOMRegistrationAware
isRegisteredAtMOM, setRegisteredAtMOM
-
-
-
-
Constructor Detail
-
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 Detail
-
getSession
public Session getSession(String key)
Returns an existing session identified by the Key else null- Specified by:
getSessionin classSessionManager- Parameters:
key- The Session key.
-
keys
public Set<String> keys()
Returns the Set of valid Session keys.- Specified by:
keysin classSessionManager
-
sessions
protected Collection<Session> sessions()
- Specified by:
sessionsin classSessionManager
-
terminateSession
public void terminateSession(String key)
Removed the Session with the given key.- Specified by:
terminateSessionin classSessionManager- Parameters:
key- The key of the Session to be removed.
-
createSession
public 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. The specified Class must have a default constructor.- Specified by:
createSessionin classSessionManager- Parameters:
key- The Session key to be used.
-
createSession
public Session createSession(String key, Object obj)
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.
-
createSession
public Session createSession(String key, SecurityContextTokenInfo sctInfo)
- Specified by:
createSessionin classSessionManager
-
createSession
public Session createSession(String key)
Creates a Session with the given key, using an instance of synchronized java.util.Mapa sa holder for user-defined data. - Specified by:
createSessionin classSessionManager- Parameters:
key- The Session key to be used.
-
saveSession
public void saveSession(String key)
Does nothing in this implementation.- Specified by:
saveSessionin classSessionManager- Parameters:
key- The key of the session to be saved
-
getSecurityContext
public 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 looked
-
addSecurityContext
public void addSecurityContext(String key, IssuedTokenContext itctx)
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
-
-