|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface for the creation, retrieval and termination of sessions.
This interface is used by the engine and SessionStrategy
implementations for managing sessions.
Note that no references to actual Session
objects are passed as arguments to these methods. This is to avoid complicating the implementation of Session
and SessionManagemer
objects. Such complexities would otherwise arise in dealing with requests to perform operations on sessions that have already expired. Instead the session in question is always identified either by its SessionID (SID) or a SessionSettings
object.
Method Summary | |
Session |
createSessionView(SessionID sid) Creates a safe view of the specified session for use by a session participant. |
SessionConfiguration |
getSessionConfiguration() Gets the session configuration information for the session manager. |
boolean |
hasSession(SessionID sid) Does a session with a given ID exist? |
InternalSession |
lookupSession(SessionID sid) Looks up a session by its session identifier (SID). |
InternalSession |
newSession() Creates a new session with default settings. |
InternalSession |
newSession(SessionSettings settings) Creates a new session with the specified settings. |
void |
terminateSession(SessionID sid) Terminates the session with the specified session ID without concern of whether the session currently has participants or not. |
Method Detail |
public boolean hasSession(SessionID sid) throws SessionLookupException
sid
- Session id.true
if the session exists, false
otherwise.java.lang.IllegalArgumentException
- if sid
is null
.SessionLookupException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.public InternalSession newSession() throws SessionCreationException
SessionCreationException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.public InternalSession newSession(SessionSettings settings) throws SessionCreationException
settings
- The settings to be used for creating the new session.java.lang.IllegalArgumentException
- if settings
is null
.SessionCreationException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.public InternalSession lookupSession(SessionID sid) throws SessionNotFoundException, SessionLookupException
sid
- The session identifierInternalSession
object corresponding to the given identifier.java.lang.IllegalArgumentException
- if sid
is null
.SessionNotFoundException
- if the session does not exist.SessionLookupException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.public Session createSessionView(SessionID sid) throws SessionNotFoundException, SessionLookupException, SessionViewCreationException
The object returned must implement the Session
interface but must not implement the InternalSession
interface. This is to protect the internal session from abuse such as inadvertent modification.
sid
- The session identifierInternalSession
object corresponding to the given identifier.java.lang.IllegalArgumentException
- if sid
is null
.SessionNotFoundException
- if the session does not exist.SessionLookupException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.SessionViewCreationException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.public void terminateSession(SessionID sid) throws SessionNotFoundException, SessionLookupException, SessionTerminationException
An implementation of this method should invoke the cleanUp
method of the session that is being killed. If the specified session does not exist, no action is taken.
sid
- The session identifierjava.lang.IllegalArgumentException
- if sid
is null
.SessionNotFoundException
- if the session does not exist.SessionLookupException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.SessionTerminationException
- if a problem prevents the method from executing. The nature of this problem may depend on implementation. The processing of the associated request cannot continue afterwards, so higher-level components of OGSA-DAI will treat all such exceptions in the same way.public SessionConfiguration getSessionConfiguration()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |