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.
-
hostname
- Holds the hostname
-
in
- Data In Stream associated with the User for reception
-
inlink
- Socket to associated with the User for reception
-
out
- Data Out Stream associated with the User for X'mission
-
outlink
- Socket to associated with the User for transmission
-
userid
- Holds the userid (not used for now)
-
username
- Holds the username
-
userset
- UserInfoSet class that launches the setting up of the socket/streams
-
UserInfo(String, String, String, String)
- Create a UserInfo instance.
-
UserInfo(String, String, String, String, int)
- Create a UserInfo instance.
-
UserInfo(int, String, String, String, String)
- Create a UserInfo instance.
-
Close()
- Close all the streams and sockets associated with this participant
-
Connected()
- Called by ReadClient if the input stream/socket associated with this
user/participant are established.
-
DisConnected()
- Called by ReadClient if the input stream/socket associated with this
user/participant is closed.
-
IsConnected()
- Used to verify if approached from the opposite side.
-
getSocket()
- gets the Socket of the participant.
-
getStream()
- gets the OutputStream associated with the Socket of the participant
-
isAlive()
- Method to test if the user info about this participant is complete
-
setAlive()
- Set if the Output Streams/Sockets of this participant is complete
Called by UserInfoSet
-
setInSocket(Socket)
- sets the Socket of the participant responsible for reading data
Set by ReadClient
-
setInStream(DataInputStream)
- sets the InputStream associated with the Socket of the participant
Set by ReadClient
-
setSocket(Socket)
- sets the Socket of the participant.
-
setStream(DataOutputStream)
- sets the DataOutputStream associated with the Socket of the participant
set by UserInfoSet
-
setUserId(int)
- Set Userid of the User.
-
toString()
- returns the string containing info about the class
username
public String username
- Holds the username
hostname
public String hostname
- Holds the hostname
userid
protected int userid
- Holds the userid (not used for now)
outlink
protected Socket outlink
- Socket to associated with the User for transmission
inlink
protected Socket inlink
- Socket to associated with the User for reception
out
protected DataOutputStream out
- Data Out Stream associated with the User for X'mission
in
protected DataInputStream in
- Data In Stream associated with the User for reception
userset
protected UserInfoSet userset
- UserInfoSet class that launches the setting up of the socket/streams
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
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
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
setUserId
public synchronized void setUserId(int uid)
- Set Userid of the User.
- Parameters:
- uid - integer attached to the user/participant
getSocket
public synchronized Socket getSocket()
- gets the Socket of the participant.
- Returns:
- Socket socket attached to user for transmission
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
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
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
getStream
public synchronized DataOutputStream getStream()
- gets the OutputStream associated with the Socket of the participant
- Returns:
- DataOutputStream attached to user for transmisssion
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
toString
public String toString()
- returns the string containing info about the class
- Returns:
- String
- Overrides:
- toString in class Object
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.
setAlive
public synchronized void setAlive()
- Set if the Output Streams/Sockets of this participant is complete
Called by UserInfoSet
Close
public synchronized void Close()
- Close all the streams and sockets associated with this participant
IsConnected
public synchronized boolean IsConnected()
- Used to verify if approached from the opposite side.
- Returns:
- boolean true if otherside has contacted us
else false
DisConnected
public synchronized void DisConnected()
- Called by ReadClient if the input stream/socket associated with this
user/participant is closed.
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