All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.ParticipantManager
java.lang.Object
|
+----java.util.Observable
|
+----ncsa.habanero.ParticipantManager
- public class ParticipantManager
- extends Observable
- implements Marshallable
The ParticipantManager keeps a list of all of the participants in a
particular session. When one is added or removed it notifies all of
the session's routers, which can choose to keep their own routing
lists or to query this object each time they route. Each client is
identified by its own unique string, which serves as the key into the
Hashtable where the clients are kept.
-
ParticipantManager(Session, SessionParticipant)
-
-
addParticipant(SessionParticipant)
-
-
clear()
-
-
contains(SessionParticipant)
-
-
countParticipants()
-
-
getParticipant(String)
-
-
notifyObservers(Object)
- For some reason the default implementation requires that a flag
be set before observers get notified.
-
participants()
-
-
removeParticipant(SessionParticipant)
-
ParticipantManager
public ParticipantManager(Session session,
SessionParticipant client)
- Returns:
- Initialize the ParticipantManager with the
Session of the participants.
addParticipant
public void addParticipant(SessionParticipant client)
- Parameters:
- client - participant to add
- Returns:
- Add a participant to the list, and notify any observers
removeParticipant
public void removeParticipant(SessionParticipant client)
- Parameters:
- client - participant to remove
- Returns:
- Remove a participant from the list, and notify any observers
participants
public Enumeration participants()
- Returns:
- an Enumeration representing the participants
contains
public boolean contains(SessionParticipant client)
- Parameters:
- client - participant to check
- Returns:
- true if our list contains the given participant
countParticipants
public int countParticipants()
- Returns:
- Return the number of participants.
getParticipant
public SessionParticipant getParticipant(String id)
- Parameters:
- id - the identification of the participant
- Returns:
- Given an id, return a SessionParticipant.
notifyObservers
public synchronized void notifyObservers(Object arg)
- For some reason the default implementation requires that a flag
be set before observers get notified. I couldn't figure out why,
so this sets the flag and then calls the default implementation.
- Overrides:
- notifyObservers in class Observable
clear
public void clear()
- Returns:
- clears the participants, nulls the session
All Packages Class Hierarchy This Package Previous Next Index