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

Class wb.UserInfo

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

public class UserInfo
extends Object
implements GTypes
class UserInfo is an information block about the user/participant in the conference. Upon Instantiation, it starts of a thread to contact the paricipants server and set up the approprite streams. Unless the streams are set this UserInfo is not made available.

Variable Index

 o hostname
Holds the hostname
 o in
Data In Stream associated with the User for reception
 o inlink
Socket to associated with the User for reception
 o out
Data Out Stream associated with the User for X'mission
 o outlink
Socket to associated with the User for transmission
 o userid
Holds the userid (not used for now)
 o username
Holds the username
 o userset
UserInfoSet class that launches the setting up of the socket/streams

Constructor Index

 o UserInfo(String, String, String, String)
Create a UserInfo instance.
 o UserInfo(String, String, String, String, int)
Create a UserInfo instance.
 o UserInfo(int, String, String, String, String)
Create a UserInfo instance.

Method Index

 o Close()
Close all the streams and sockets associated with this participant
 o Connected()
Called by ReadClient if the input stream/socket associated with this user/participant are established.
 o DisConnected()
Called by ReadClient if the input stream/socket associated with this user/participant is closed.
 o IsConnected()
Used to verify if approached from the opposite side.
 o getSocket()
gets the Socket of the participant.
 o getStream()
gets the OutputStream associated with the Socket of the participant
 o isAlive()
Method to test if the user info about this participant is complete
 o setAlive()
Set if the Output Streams/Sockets of this participant is complete Called by UserInfoSet
 o setInSocket(Socket)
sets the Socket of the participant responsible for reading data Set by ReadClient
 o setInStream(DataInputStream)
sets the InputStream associated with the Socket of the participant Set by ReadClient
 o setSocket(Socket)
sets the Socket of the participant.
 o setStream(DataOutputStream)
sets the DataOutputStream associated with the Socket of the participant set by UserInfoSet
 o setUserId(int)
Set Userid of the User.
 o toString()
returns the string containing info about the class

Variables

 o username
  public String username
Holds the username
 o hostname
  public String hostname
Holds the hostname
 o userid
  protected int userid
Holds the userid (not used for now)
 o outlink
  protected Socket outlink
Socket to associated with the User for transmission
 o inlink
  protected Socket inlink
Socket to associated with the User for reception
 o out
  protected DataOutputStream out
Data Out Stream associated with the User for X'mission
 o in
  protected DataInputStream in
Data In Stream associated with the User for reception
 o userset
  protected UserInfoSet userset
UserInfoSet class that launches the setting up of the socket/streams

Constructors

 o UserInfo
  public UserInfo(String luser,
                  String lhost,
                  String name,
                  String host)
Create a UserInfo instance. It also starts a thread that will try to talk to server of the remote host. User info is available at the start up time.
Parameters:
luser - String containing the local user name
lhost - String containing the local host name
name - String containing the user name of the participant
host - String containing the host name of the participant
 o UserInfo
  public UserInfo(String luser,
                  String lhost,
                  String name,
                  String host,
                  int type)
Create a UserInfo instance. It also starts a thread that will try to talk to server of the remote host. Useful for users who join a conference in progress.
Parameters:
luser - String containing the local user name
lhost - String containing the local host name
name - String containing the user name of the participant
host - String containing the host name of the participant
type - int CMJOIN when the conference manager initiates. int WBJOIN when the user of WB uses Call Participant
 o UserInfo
  public UserInfo(int uid,
                  String luser,
                  String lhost,
                  String name,
                  String host)
Create a UserInfo instance. It also starts a thread that will try to talk to server of the remote host. NOT Used for now
Parameters:
uid - userid of the user.
luser - String containing the local user name
lhost - String containing the local host name
name - String containing the user name of the participant
host - String containing the host name of the participant

Methods

 o setUserId
  public synchronized void setUserId(int uid)
Set Userid of the User.
Parameters:
uid - integer attached to the user/participant
 o getSocket
  public synchronized Socket getSocket()
gets the Socket of the participant.
Returns:
Socket socket attached to user for transmission
 o setSocket
  public synchronized void setSocket(Socket arg)
sets the Socket of the participant. Done by the UserInfoSet
Parameters:
Socket - socket attached to user for transmission
 o setInSocket
  public synchronized void setInSocket(Socket arg)
sets the Socket of the participant responsible for reading data Set by ReadClient
Parameters:
arg - socket attached to user for reception
 o setInStream
  public synchronized void setInStream(DataInputStream arg)
sets the InputStream associated with the Socket of the participant Set by ReadClient
Parameters:
arg - DataInputStream attached to user for reception
 o getStream
  public synchronized DataOutputStream getStream()
gets the OutputStream associated with the Socket of the participant
Returns:
DataOutputStream attached to user for transmisssion
 o setStream
  public synchronized void setStream(DataOutputStream arg)
sets the DataOutputStream associated with the Socket of the participant set by UserInfoSet
Parameters:
arg - DataOutputStream attached to user for transmisssion
 o toString
  public String toString()
returns the string containing info about the class
Returns:
String
Overrides:
toString in class Object
 o isAlive
  public synchronized boolean isAlive()
Method to test if the user info about this participant is complete
Returns:
boolean true if all the components are set. false if not.
 o setAlive
  public synchronized void setAlive()
Set if the Output Streams/Sockets of this participant is complete Called by UserInfoSet
 o Close
  public synchronized void Close()
Close all the streams and sockets associated with this participant
 o IsConnected
  public synchronized boolean IsConnected()
Used to verify if approached from the opposite side.
Returns:
boolean true if otherside has contacted us else false
 o DisConnected
  public synchronized void DisConnected()
Called by ReadClient if the input stream/socket associated with this user/participant is closed.
 o Connected
  public synchronized void Connected()
Called by ReadClient if the input stream/socket associated with this user/participant are established.

All Packages  Class Hierarchy  This Package  Previous  Next  Index