Class wb.Participants
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class wb.Participants

java.lang.Object
   |
   +----wb.Participants

public class Participants
extends Object
Participants is a collection of all the users in the conference. Information about the users is specified in class ``UserInfo''. Each user has a key a string formed by "username" + "hostname". (Since a user cannot be on two hosts this turns out to be a unique key). In the normal operation, all the participants are known at the start up time, however, there could be some users who join in the middle of a conference. Such users' information is obtained by the conference manager of MONET, using the message system. see GTypes for various kinds of users. It is necessary for this session to known about the local host name and user name. These are obtained at the start up time.

Variable Index

 o lhostname
String to hold the local host name
 o lusername
String to hold the local user name

Constructor Index

 o Participants(String, String)
Creates an instance of the Participants with the specified local username and local hostname

Method Index

 o AddUser(UserInfo)
Provides an interface to add a user to the participants list Verifies if the user is already in the list
 o CheckUser(String)
Facility to verify if the user is valid.
 o CloseAll()
Facility to known the current mute state of this user.
 o CloseParticipant(String, String)
Helper method to close explicitly a specified User.
 o CloseParticipant(String)
Alternate way to close a specified participants
 o DelUser(UserInfo)
Facility to remove a user from the participants list
 o GetUser(String)
Interface to get a reference to the UserInfo with the specified key (username+hostname)
 o GetUsers(boolean)
An interface to get all the users sequentially.
 o Mute()
Sets the mute flag, thus this user will only receive and nothing is transmitted to other participants
 o ParticipantsReady()
Interface to check if all the users are connected.
 o Print()
Helper routine to print the participants
 o RemoveAll()
Facility to make the participants list null.
 o SetUsers()
SetUsers (was planning for something
 o isEmpty()
Returns a boolean to indicate that the participants list is empty
 o size()
Returns the size of the conference.

Variables

 o lusername
  public String lusername
String to hold the local user name
 o lhostname
  public String lhostname
String to hold the local host name

Constructors

 o Participants
  public Participants(String thisuser,
                      String thishost)
Creates an instance of the Participants with the specified local username and local hostname
Parameters:
thisuser - string to containing the username
thishost - string to containing the hostname
See Also:
AddUser

Methods

 o AddUser
  public synchronized void AddUser(UserInfo arg)
Provides an interface to add a user to the participants list Verifies if the user is already in the list
Parameters:
arg - reference to UserInfo
 o CheckUser
  public synchronized boolean CheckUser(String user_host)
Facility to verify if the user is valid. i.e. element of Participants
Parameters:
user_host - String that holds the "username"+"hostname"
Returns:
boolean true iff the Key has a valid entry
 o DelUser
  public synchronized void DelUser(UserInfo arg)
Facility to remove a user from the participants list
Parameters:
arg - the reference to a UserInfo
 o RemoveAll
  public synchronized void RemoveAll()
Facility to make the participants list null.
 o GetUsers
  public synchronized UserInfo GetUsers(boolean flag)
An interface to get all the users sequentially. (iternator) This method should be called with true flag first to ensure that the counter resets to the beginning of the list.
Parameters:
flag - boolean (true) to reset the internal counter
 o GetUser
  public synchronized UserInfo GetUser(String user_host)
Interface to get a reference to the UserInfo with the specified key (username+hostname)
Parameters:
user_host - the string containing username+hostname
Returns:
UserInfo if valid else null
 o size
  public synchronized int size()
Returns the size of the conference. (no of users)
Returns:
int number of users.
 o isEmpty
  public synchronized boolean isEmpty()
Returns a boolean to indicate that the participants list is empty
Returns:
true iff number of participants is zero
 o Print
  public synchronized void Print()
Helper routine to print the participants
 o SetUsers
  public synchronized void SetUsers()
SetUsers (was planning for something
 o Mute
  public synchronized void Mute()
Sets the mute flag, thus this user will only receive and nothing is transmitted to other participants
 o CloseAll
  public synchronized void CloseAll()
Facility to known the current mute state of this user.
Returns:
boolean true if this user is in receive mode only public synchronized boolean isMute() { return mute; } /** Helper method to clean up.
 o CloseParticipant
  public synchronized void CloseParticipant(String username,
                                            String hostname)
Helper method to close explicitly a specified User.
Parameters:
username - string holding user's name
hostname - string holding host name
 o CloseParticipant
  public synchronized void CloseParticipant(String user_host)
Alternate way to close a specified participants
Parameters:
user_host - string containing the key = username + hostname
 o ParticipantsReady
  public synchronized boolean ParticipantsReady()
Interface to check if all the users are connected. Designed to make sure that the conference members are ready before displaying the editor window. Currently not being used.
Returns:
boolean true iff all the users are ready

All Packages  Class Hierarchy  This Package  Previous  Next  Index