uk.org.ogsadai.sessions
Interface SessionCoordinator

All Known Implementing Classes:
SimpleSessionCoordinator

public interface SessionCoordinator

The interface for coordinating the joining and releasing of session participants to and from their sessions.

Author:
The OGSA-DAI Project Team

Method Summary
 SessionManager getSessionManager()
          Returns a reference to the SessionManager that is being used for creating, retrieving and terminating sessions.
 void join(SessionParticipant participant)
          Joins the specified session participant to a session that matches its requirments.
 void release(SessionParticipant participant)
          Releases the specified session participant from the session to which it is joined.
 

Method Detail

join

public void join(SessionParticipant participant)
          throws SessionNotFoundException,
                 SessionJoinDeniedException,
                 SessionJoinException
Joins the specified session participant to a session that matches its requirments.

A session participant encapsulates its requirements inside the SessionStrategy object returned by its createSessionStrategy method.

After this method returns the session participant will be able to interact with the session that it has joined.

Parameters:
participant - The SessionParticipant.
Throws:
SessionNotFoundException - if the session specified by the participant does not exist.
SessionJoinDeniedException - if there is an application-specific reason why the participant is not allowed to join.
SessionJoinException - if there is an internal problem that occurs during the join.
java.lang.IllegalArgumentException - if participant is null.

release

public void release(SessionParticipant participant)
             throws SessionNotFoundException,
                    SessionReleaseException
Releases the specified session participant from the session to which it is joined.

This should be invoked when the session participant has no further need to interact with the session.

Parameters:
participant - the SessionParticipant to release
Throws:
SessionNotFoundException - if the session specified by the participant does not exist.
SessionReleaseException - if there is an internal problem that occurs during the release.
java.lang.IllegalArgumentException - if participant is null.

getSessionManager

public SessionManager getSessionManager()
Returns a reference to the SessionManager that is being used for creating, retrieving and terminating sessions.

Returns:
SessionManager.