| |
|
| java.lang.Object com.lutris.appserver.server.sessionEnhydra.BasicSessionHome
BasicSessionHome | public class BasicSessionHome implements StandardSessionHome(Code) | | BasicSessionHome creates instances of BasicSession and
manages the 'active'/'passive' state of those sessions.
All sessions created by BasicSessionHome are held in
memory.
The following parameters can be used to configure
the BasicSessionHome. They should be grouped together in a section,
normally SessionManager.SessionHome , which is specified to
the constructor.
See Also: BasicSession See Also: StandardSession See Also: StandardSessionManager version: $Revision: 1.3 $ author: Kyle Clark |
Method Summary | |
public boolean | containsKey(String sessionKey) Specifies if a key is currently bound to a session. | public synchronized StandardSession | createSession(String sessionKey) Creates and returns a new session instance. | protected void | debug(int level, String msg) Prints debug information under Logger.DEBUG. | public synchronized StandardSession | getSession(String sessionKey) Returns the session bound to the session key.
The session must already be in the 'active' state
and associated with the current thread,
otherwise null is returned.
Parameters: sessionKey - the session key for the session. | public synchronized StandardSession | getSession(Thread thread, String sessionKey) Returns the session bound to the specified
session key. | public synchronized Enumeration | keys() Returns an enumeration of the keys for all the sessions. | public int | pagedSize() Returns the current number of sessions that are paged to
persistent store. | public synchronized void | passivateSession(Thread thread, String sessionKey) Puts a session into the 'passive' state. | public synchronized void | removeSession(String sessionKey) Removes a session from the cache. | public void | shutdown() Shuts dows the session home. | public int | size() Returns the current number of sessions. |
BasicSessionHome | public BasicSessionHome(StandardSessionManager sessionMgr, Config config) throws ConfigException(Code) | | Parameters: sessionMgr - The session manager associated with this session home. Parameters: config - Object parsed from configuration file. This should befor the section constaining the standard session home configuration. exception: ConfigException - signifies a problem in the configuration file. |
BasicSessionHome | public BasicSessionHome(StandardSessionManager sessionMgr, Config config, ClassLoader loader) throws ConfigException(Code) | | Parameters: sessionMgr - The session manager associated with this session home. Parameters: config - Object parsed from configuration file. This should befor the section constaining the standard session home configuration. Parameters: loader - The class load to use when load objects from persistent store. exception: ConfigException - signifies a problem in the configuration file. |
containsKey | public boolean containsKey(String sessionKey) throws SessionException(Code) | | Specifies if a key is currently bound to a session.
Parameters: sessionKey - the session key to be tested.true if the session key is in use. exception: SessionException - if the existence of the key cannot be determined. |
debug | protected void debug(int level, String msg)(Code) | | Prints debug information under Logger.DEBUG.
Parameters: level - the debug level. Parameters: msg - the message to print. |
getSession | public synchronized StandardSession getSession(String sessionKey) throws SessionException(Code) | | Returns the session bound to the session key.
The session must already be in the 'active' state
and associated with the current thread,
otherwise null is returned.
Parameters: sessionKey - the session key for the session. If the sessiondoesn't exist or is not is not bound to the currentthread then null is returned.the session. exception: SessionException - if the session cannot be retrieved. See Also: BasicSessionHome.getSession(Thread,String) |
getSession | public synchronized StandardSession getSession(Thread thread, String sessionKey) throws SessionException(Code) | | Returns the session bound to the specified
session key. The session is put into the 'active' state.
The session is also associated with the specified thread.
Only this thread will be able to put the session
back into the 'passive' state once it is done with the
session.
Parameters: thread - the thread that should be associated withthe session while it is in the active state. Only thisthread can put the session back into the passive state. Parameters: sessionKey - the session key for the session that will be made'active' and returned. If the session doesn't existthen null is returned.the session. exception: SessionException - if the session cannot be retrieved. See Also: BasicSessionHome.passivateSession |
pagedSize | public int pagedSize() throws SessionException(Code) | | Returns the current number of sessions that are paged to
persistent store.
the 'paged' session count. exception: SessionException - if the size cannot be determined |
passivateSession | public synchronized void passivateSession(Thread thread, String sessionKey) throws SessionException(Code) | | Puts a session into the 'passive' state. A 'passive'
session may be made persistent. Only the thread that
put the session into the 'active' state may put
the session into the 'passive' state.
Parameters: thread - the thread that is currently associatedwith the session. Parameters: sessionKey - the session key for the session that will be made passive. exception: SessionException - if the session cannot be retrieved. |
removeSession | public synchronized void removeSession(String sessionKey) throws SessionException(Code) | | Removes a session from the cache. If the session
doesn't exist the opration is ignored.
Parameters: sessionKey - the session key associated with the session. exception: SessionException - if the session cannot be retrieved. |
shutdown | public void shutdown()(Code) | | Shuts dows the session home.
|
|
|
|