uk.org.ogsadai.sessions
Interface SessionParticipant

All Known Subinterfaces:
Request
All Known Implementing Classes:
ActivityRequest

public interface SessionParticipant

The interface for all objects capable of joining sessions.

Author:
The OGSA-DAI Project Team

Method Summary
 Session getSession()
          Gets the Session that the session participant is joined to.
 SessionStrategy getSessionStrategy()
          Gets the SessionStrategy object for the session participant.
 void setSession(Session session)
          Provides the session participant with the session to which it is joined.
 

Method Detail

getSessionStrategy

public SessionStrategy getSessionStrategy()
Gets the SessionStrategy object for the session participant.

This object understands how to obtain the session from the SessionManager for this session participant.

Returns:
SessionStrategy object.

setSession

public void setSession(Session session)
Provides the session participant with the session to which it is joined. After this method has been invoked, the session participant may access and interact with the session via the getSession() method.

Parameters:
session - The Session for the participant to join.
Throws:
java.lang.IllegalArgumentException - if the session argument is null.

getSession

public Session getSession()
Gets the Session that the session participant is joined to.

This can only be invoked after the setSession() method has been invoked.

Returns:
session associated with this session participant
Throws:
java.lang.IllegalStateException - if invoked before setSession().