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.
-
lhostname
- String to hold the local host name
-
lusername
- String to hold the local user name
-
Participants(String, String)
- Creates an instance of the Participants with the specified local username
and local hostname
-
AddUser(UserInfo)
- Provides an interface to add a user to the participants list
Verifies if the user is already in the list
-
CheckUser(String)
- Facility to verify if the user is valid.
-
CloseAll()
- Facility to known the current mute state of this user.
-
CloseParticipant(String, String)
- Helper method to close explicitly a specified User.
-
CloseParticipant(String)
- Alternate way to close a specified participants
-
DelUser(UserInfo)
- Facility to remove a user from the participants list
-
GetUser(String)
- Interface to get a reference to the UserInfo with the specified
key (username+hostname)
-
GetUsers(boolean)
- An interface to get all the users sequentially.
-
Mute()
- Sets the mute flag, thus this user will only receive and nothing
is transmitted to other participants
-
ParticipantsReady()
- Interface to check if all the users are connected.
-
Print()
- Helper routine to print the participants
-
RemoveAll()
- Facility to make the participants list null.
-
SetUsers()
- SetUsers (was planning for something
-
isEmpty()
- Returns a boolean to indicate that the participants list is empty
-
size()
- Returns the size of the conference.
lusername
public String lusername
- String to hold the local user name
lhostname
public String lhostname
- String to hold the local host name
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
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
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
DelUser
public synchronized void DelUser(UserInfo arg)
- Facility to remove a user from the participants list
- Parameters:
- arg - the reference to a UserInfo
RemoveAll
public synchronized void RemoveAll()
- Facility to make the participants list null.
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
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
size
public synchronized int size()
- Returns the size of the conference. (no of users)
- Returns:
- int number of users.
isEmpty
public synchronized boolean isEmpty()
- Returns a boolean to indicate that the participants list is empty
- Returns:
- true iff number of participants is zero
Print
public synchronized void Print()
- Helper routine to print the participants
SetUsers
public synchronized void SetUsers()
- SetUsers (was planning for something
Mute
public synchronized void Mute()
- Sets the mute flag, thus this user will only receive and nothing
is transmitted to other participants
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.
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
CloseParticipant
public synchronized void CloseParticipant(String user_host)
- Alternate way to close a specified participants
- Parameters:
- user_host - string containing the key = username + hostname
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