Class prominence.msgx.GenericSourceIDClient
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prominence.msgx.GenericSourceIDClient

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----prominence.msg.GenericClient
                   |
                   +----prominence.msgx.GenericSourceIDClient

public class GenericSourceIDClient
extends GenericClient
A variant of the GenericClient class that supports message source identification, i.e., all messages are prefixed with a header that indicates the sender's name.
See Also:
GenericSourceIDServer, SourceIDClient

Constructor Index

 o GenericSourceIDClient(String, int, String)
Creates a new GenericSourceIDClient that connects to a GenericSourceIDServer and attempts to register the chosen client name.

Method Index

 o demux()
Routes incoming messages from the server to the appropriate tool.

Constructors

 o GenericSourceIDClient
  public GenericSourceIDClient(String hostName,
                               int hostPort,
                               String name) throws IOException
Creates a new GenericSourceIDClient that connects to a GenericSourceIDServer and attempts to register the chosen client name.
Parameters:
hostName - The name of the GenericSourceIDServer host
hostPort - The GenericSourceIDServer port
name - The client name
Throws: IOException
Occurs if the GenericSourceIDServer could not be contacted, or the client name is already in use.
See Also:
connect, logon

Methods

 o demux
  protected void demux() throws IOException
Routes incoming messages from the server to the appropriate tool.

Strips the name header and the multiplexing header from each message, and routes the message body to the appropriate tool. If the tool implements the SourceIDClient interface, then the sender's name is included with the message body.

Throws: IOException
Occurs if there is a problem reading messages from the server.
Overrides:
demux in class GenericClient
See Also:
SourceIDClient

All Packages  Class Hierarchy  This Package  Previous  Next  Index