public class CollabClient extends Client
Client class to
support the collaboration mechanism with the IDV.
In particular it has a name (the name of the client)
and a flag to show if this is the Client object
that represents the local user.
In the future this could hold more information: contact info, etc.| Constructor and Description |
|---|
CollabClient()
Create a dummy version of this object.
|
CollabClient(CollabManager collabManager,
java.net.Socket socket)
Create this client with the already existing socket.
|
CollabClient(CollabManager collabManager,
java.lang.String hostName,
int port)
Create the client and have it try to connect to a Server
at the given hostname and port.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getIsLocal()
Get the IsLocal property.
|
java.lang.String |
getName()
Get the Name property.
|
void |
handleServerMessage(java.lang.String msg)
Route the message to the CollabManager
|
void |
setIsLocal(boolean value)
Set the isLocal property.
|
void |
setName(java.lang.String value)
Set the Name property.
|
close, debug, getHostname, getOkToReceive, getOkToSend, getValid, isConnectionOk, logException, main, read, setHostname, setOkToReceive, setOkToSend, setValid, toString, writepublic CollabClient()
public CollabClient(CollabManager collabManager, java.lang.String hostName, int port) throws java.io.IOException
Server
You can check if the connection was successful
with Client.isConnectionOk()collabManager - Reference to the singleton CollabManagerhostName - Host to connect toport - Port on host to connect tojava.io.IOException - Signals that an I/O exception has occurred.public CollabClient(CollabManager collabManager, java.net.Socket socket) throws java.io.IOException
collabManager - Reference to the singleton CollabManagersocket - The socketjava.io.IOException - Signals that an I/O exception has occurred.public void handleServerMessage(java.lang.String msg)
handleServerMessage in class Clientmsg - The messagepublic void setName(java.lang.String value)
value - The new value for Namepublic java.lang.String getName()
public void setIsLocal(boolean value)
value - The new value for isLocalpublic boolean getIsLocal()