Class prominence.chat.ChatSystemClient
All Packages Class Hierarchy This Package Previous Next Index
Class prominence.chat.ChatSystemClient
java.lang.Object
|
+----java.lang.Thread
|
+----prominence.msg.GenericClient
|
+----prominence.chat.ChatSystemClient
- public class ChatSystemClient
- extends GenericClient
An extension to the GenericClient class that supports
message source identification, i.e., the sender's name is
included with a message if the destination implements the
ChatClient interface.
- See Also:
- ChatSystemServer, ChatSystemHandler, GenericClient, ChatClient
-
ChatSystemClient(String, int, String)
- Creates a new ChatSystemClient connecting to the
specified server with the chosen name.
-
demux()
- Demultiplexes incoming messages.
ChatSystemClient
public ChatSystemClient(String hostName,
int hostPort,
String name) throws IOException
- Creates a new ChatSystemClient connecting to the
specified server with the chosen name.
- Parameters:
- hostName - The name of the host to connect to
- hostPort - The port on the host to connect to
- name - The client name to use
- Throws: IOException
- Occurs when the remote host could not
be contacted or the client name was already in use.
- See Also:
- GenericClient
demux
protected void demux() throws IOException
- Demultiplexes incoming messages. Strips the sender's name, the
originating tool's name and routes the message to the appropriate
tool.
Identifies the sender's name if the destination tool implements
the ChatClient interface.
- Throws: IOException
- Occurs if there is a problem reading a
message from the InputStream.
- Overrides:
- demux in class GenericClient
- See Also:
- receive, receive
All Packages Class Hierarchy This Package Previous Next Index