|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionManager
A SessionManager manages the creation, maintenance, and clean-up of all application
Session
s.
Method Summary | |
---|---|
Session |
getSession(SessionKey key)
Retrieves the session corresponding to the specified contextual data (such as a session ID if applicable), or null if no Session could be found. |
Session |
start(SessionContext context)
Starts a new session based on the specified contextual initialization data, which can be used by the underlying implementation to determine how exactly to create the internal Session instance. |
Method Detail |
---|
Session start(SessionContext context)
SessionFactory
which could use the context to construct the internal Session
instance in a specific manner. This allows pluggable Session
creation
logic by simply injecting a SessionFactory
into the SessionManager
instance.
context
- the contextual initialization data that can be used by the implementation or underlying
SessionFactory
when instantiating the internal Session
instance.
SessionFactory.createSession(SessionContext)
Session getSession(SessionKey key) throws SessionException
null
if no Session could be found. If a session is found but invalid (stopped or expired), a
SessionException
will be thrown.
key
- the Session key to use to look-up the Session
Session
instance corresponding to the given lookup key or null
if no session
could be acquired.
SessionException
- if a session was found but it was invalid (stopped/expired).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |