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

java.lang.Object
  extended by com.sun.xml.ws.commons.AbstractMOMRegistrationAware
      extended by com.sun.xml.ws.runtime.dev.SessionManager
          extended by com.sun.xml.ws.runtime.dev.SessionManagerImpl
All Implemented Interfaces:
MOMRegistrationAware

public class SessionManagerImpl
extends SessionManager

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
SessionManagerImpl(WSEndpoint endpoint, boolean isSC)
          Creates a new instance of SessionManagerImpl
SessionManagerImpl(WSEndpoint endpoint, boolean isSC, Properties config)
          Creates a new instance of SessionManagerImpl
 
Method Summary
 void addSecurityContext(String key, IssuedTokenContext itctx)
          Add the SecurityContext with key in local cache
 Session createSession(String key)
          Creates a Session with the given key, using an instance of synchronized java.util.Map a sa holder for user-defined data.
 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.
 Session createSession(String key, Object obj)
          Creates a Session with the given key, using the specified Object as a holder for user-defined data.
 Session createSession(String key, SecurityContextTokenInfo sctInfo)
           
 IssuedTokenContext getSecurityContext(String key, boolean checkExpiry)
          Return the valid SecurityContext for matching key
 Session getSession(String key)
          Returns an existing session identified by the Key else null
 Set<String> keys()
          Returns the Set of valid Session keys.
 void saveSession(String key)
          Does nothing in this implementation.
protected  Collection<Session> sessions()
           
 void terminateSession(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionManagerImpl

public SessionManagerImpl(WSEndpoint endpoint,
                          boolean isSC)
Creates a new instance of SessionManagerImpl


SessionManagerImpl

public SessionManagerImpl(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:
getSession in class SessionManager
Parameters:
key - The Session key.

keys

public Set<String> keys()
Returns the Set of valid Session keys.

Specified by:
keys in class SessionManager

sessions

protected Collection<Session> sessions()
Specified by:
sessions in class SessionManager

terminateSession

public void terminateSession(String key)
Removed the Session with the given key.

Specified by:
terminateSession in class SessionManager
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:
createSession in class SessionManager
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:
createSession in class SessionManager
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:
createSession in class SessionManager

createSession

public Session createSession(String key)
Creates a Session with the given key, using an instance of synchronized java.util.Map a sa holder for user-defined data.

Specified by:
createSession in class SessionManager
Parameters:
key - The Session key to be used.

saveSession

public void saveSession(String key)
Does nothing in this implementation.

Specified by:
saveSession in class SessionManager
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:
getSecurityContext in class SessionManager
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:
addSecurityContext in class SessionManager
Parameters:
key - The key of the security context to be stored
itctx - The IssuedTokenContext to be stored


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