|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.sessions.impl.ImplicitSessionStrategy
A SessionStrategy
that creates a new implicit session
with default settings.
An implicit session is used when a request supplies no specific
session settings. Implicit sessions are automatically cleaned-up as
soon as the SessionParticipant
no longer needs them. A
SessionListener
is attached to the session to achieve
this.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private static DAILogger |
LOG
|
Constructor Summary | |
ImplicitSessionStrategy()
Constructs a strategy for creating a new session with default settings. |
Method Summary | |
(package private) SessionListener |
createSessionListener(SessionManager manager)
Creates a SessionListener that will automatically
terminate the session when the last session participant
leaves. |
InternalSession |
obtainSession(SessionManager manager)
Uses the session manager to create a new session or access an existing session, depending on the session requirements built into the strategy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
Constructor Detail |
public ImplicitSessionStrategy()
Method Detail |
public InternalSession obtainSession(SessionManager manager) throws SessionCreationException, SessionLookupException, SessionNotFoundException
SessionStrategy
An implementation of this method should also take necessary measures to ensure that the session ends at the appropriate point, such as after a certain time has passed.
obtainSession
in interface SessionStrategy
manager
- The SessionManagement
to use for interactions.
SessionAccess
object to the session thus
obtained.
SessionNotFoundException
- if a specific named session
does not exist.
SessionCreationException
- if some problem arises when
creating a new session.
SessionLookupException
- if some problem arises when
accessing an existing session.SessionListener createSessionListener(SessionManager manager)
SessionListener
that will automatically
terminate the session when the last session participant
leaves.
This method is given package level accessiblity for testing purposes.
manager
- SessionManager
managing session.
SessionListener
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |