| |
|
| com.lutris.appserver.server.sessionEnhydra.StandardSessionHome
All known Subclasses: com.lutris.appserver.server.sessionEnhydra.PagedSessionHome, com.lutris.appserver.server.sessionEnhydra.BasicSessionHome,
StandardSessionHome | public interface StandardSessionHome (Code) | | StandardSessionManager uses StandardSessionHome to manage
a collection of sessions. StandardSessionHome acts both as
a session factory and as a session repository. The session
manager gains access to instances of sessions via the
home (StandardSessionHome) interface. The session manager
dynamically loads the home interface. The implementation
of the home interface that is loaded is specified in the
applications configuration file:
SessionHome.Class: {class name}
StandardSessionHome manages the state of a session.
A session exists in either of two states: 'active'
or 'passive'. An 'active' session
is one that is actively being referenced by a thread of
execution (request). A 'passive' session is one that
is not currently associated with any request (thread).
A session in the 'passive' state may be written to persistent store
until it becomes 'active'. When a session becomes active,
if it isn't in memory then it can be read from persistent store.
See Also: StandardSession See Also: StandardSessionManager See Also: BasicSessionHome See Also: PagedSessionHome See Also: com.lutris.appserver.server.sessionEnhydra.persistent.PersistentSessionHome version: $Revision: 1.2 $ author: Kyle Clark |
Method Summary | |
public boolean | containsKey(String sessionKey) Specifies if a key is currently bound to a session. | public StandardSession | createSession(String sessionKey) Creates and returns a new session instance. | public 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 StandardSession | getSession(Thread thread, String sessionKey) Returns the session bound to the specified
session key. | public 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 void | passivateSession(Thread thread, String sessionKey) Puts a session into the 'passive' state. | public 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. |
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. |
getSession | public 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: StandardSessionHome.getSession(Thread,String) |
getSession | public 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: StandardSessionHome.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 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 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.
|
|
|
|