uk.org.ogsadai.sessions
Interface SessionStrategy

All Known Implementing Classes:
ExplicitSessionStrategy, ImplicitSessionStrategy, ReferenceSessionStrategy, TerminateSessionStrategy

public interface SessionStrategy

The interface for obtaining sessions from the session manager.

Different strategies may obtain sessions in different ways. For example, one might create a new session while another retrieves an existing session.

A SessionStrategy implementation should also take necessary measures to ensure that the session ends at the appropriate point, such as after a certain time has passed.

Author:
The OGSA-DAI Project Team

Method Summary
 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.
 

Method Detail

obtainSession

public InternalSession obtainSession(SessionManager manager)
                              throws SessionCreationException,
                                     SessionLookupException,
                                     SessionNotFoundException
Uses the session manager to create a new session or access an existing session, depending on the session requirements built into the strategy.

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.

Parameters:
manager - The SessionManagement to use for interactions.
Returns:
A SessionAccess object to the session thus obtained.
Throws:
SessionCreationException - if some problem arises when creating a new session.
SessionLookupException - if some problem arises when accessing an existing session.
SessionNotFoundException - if a specific named session does not exist.