org.jlab.coda.cMsg
Class cMsgClientInfo

java.lang.Object
  extended by org.jlab.coda.cMsg.cMsgClientInfo

public class cMsgClientInfo
extends java.lang.Object

This class stores a cMsg client's information.

Version:
1.0
Author:
Carl Timmer

Constructor Summary
cMsgClientInfo(java.lang.String name, int nsPort, int port, java.lang.String host)
          Constructor used when cMsg server acts as a client and connects a to cMsg server.
cMsgClientInfo(java.lang.String name, int nsPort, int port, java.lang.String host, java.lang.String subdomain, java.lang.String UDLRemainder, java.lang.String UDL, java.lang.String description)
          Constructor specifing client's name, port, host, subdomain, and UDL remainder.
 
Method Summary
 java.lang.String getClientHost()
          Gets host client is running on.
 int getClientPort()
          Gets TCP port client is listening on.
 cMsgDeliverMessageInterface getDeliverer()
          Gets the object used to deliver messages to this client.
 java.lang.String getDescription()
          Gets client's description.
 java.lang.String getDomainHost()
          Gets host domain server is running on.
 int getDomainPort()
          Gets TCP port domain server is listening on.
 int getDomainUdpPort()
          Gets UDP port domain server is listening on.
 java.lang.String getName()
          Gets client's name.
 java.lang.String getNamespace()
          Gets the namespace of client's cMsg subdomain.
 java.lang.String getServerHost()
          Gets host connecting name server (client of this server) is running on.
 int getServerPort()
          Gets the TCP port the connecting name server (client of this server) is listening on.
 java.lang.String getSubdomain()
          Gets subdomain client is using.
 java.lang.String getUDL()
          Gets client's UDL.
 java.lang.String getUDLremainder()
          Gets remainder of the UDL the client used to connect to the domain server.
 boolean isServer()
          States whether this client is a cMsg server or not.
 void setDeliverer(cMsgDeliverMessageInterface deliverer)
          Sets the object used to deliver messages to this client.
 void setDomainHost(java.lang.String domainHost)
          Sets host domain server is running on.
 void setDomainPort(int domainPort)
          Sets TCP port domain server is listening on.
 void setDomainUdpPort(int domainUdpPort)
          Sets UDP port domain server is listening on.
 void setNamespace(java.lang.String namespace)
          Sets the namespace of client's cMsg subdomain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

cMsgClientInfo

public cMsgClientInfo(java.lang.String name,
                      int nsPort,
                      int port,
                      java.lang.String host,
                      java.lang.String subdomain,
                      java.lang.String UDLRemainder,
                      java.lang.String UDL,
                      java.lang.String description)
Constructor specifing client's name, port, host, subdomain, and UDL remainder. Used in nameServer for a connecting regular client.

Parameters:
name - client's name
nsPort - name server's listening port
port - client's listening port
host - client's host
subdomain - client's subdomain
UDLRemainder - client's UDL's remainder
UDL - client's UDL
description - client's description

cMsgClientInfo

public cMsgClientInfo(java.lang.String name,
                      int nsPort,
                      int port,
                      java.lang.String host)
Constructor used when cMsg server acts as a client and connects a to cMsg server. Used in nameServer for a connecting server client.

Parameters:
name - client's name
nsPort - name server's listening port
port - client's listening port
host - client's host
Method Detail

getName

public java.lang.String getName()
Gets client's name.

Returns:
client's name

getDescription

public java.lang.String getDescription()
Gets client's description.

Returns:
client's description

getUDL

public java.lang.String getUDL()
Gets client's UDL.

Returns:
client's UDL

getUDLremainder

public java.lang.String getUDLremainder()
Gets remainder of the UDL the client used to connect to the domain server.

Returns:
remainder of the UDL

getSubdomain

public java.lang.String getSubdomain()
Gets subdomain client is using.

Returns:
subdomain client is using

getNamespace

public java.lang.String getNamespace()
Gets the namespace of client's cMsg subdomain.

Returns:
namespace of client's cMsg subdomain

setNamespace

public void setNamespace(java.lang.String namespace)
Sets the namespace of client's cMsg subdomain.

Parameters:
namespace - namespace of client's cMsg subdomain

getClientHost

public java.lang.String getClientHost()
Gets host client is running on.

Returns:
host client is running on

getClientPort

public int getClientPort()
Gets TCP port client is listening on.

Returns:
TCP port client is listening on

getDomainHost

public java.lang.String getDomainHost()
Gets host domain server is running on.

Returns:
host domain server is running on

setDomainHost

public void setDomainHost(java.lang.String domainHost)
Sets host domain server is running on.

Parameters:
domainHost - host domain server is running on

getDomainPort

public int getDomainPort()
Gets TCP port domain server is listening on.

Returns:
TCP port domain server is listening on

setDomainPort

public void setDomainPort(int domainPort)
Sets TCP port domain server is listening on.

Parameters:
domainPort - TCP port domain server is listening on

getDomainUdpPort

public int getDomainUdpPort()
Gets UDP port domain server is listening on. Meaningful only if client is sending by UDP.

Returns:
UDP port domain server is listening on

setDomainUdpPort

public void setDomainUdpPort(int domainUdpPort)
Sets UDP port domain server is listening on. Meaningful only if client is sending by UDP.

Parameters:
domainUdpPort - TCP port domain server is listening on

getServerHost

public java.lang.String getServerHost()
Gets host connecting name server (client of this server) is running on.

Returns:
host connecting name server is running on

getServerPort

public int getServerPort()
Gets the TCP port the connecting name server (client of this server) is listening on.

Returns:
TCP port connecting name server is listening on

isServer

public boolean isServer()
States whether this client is a cMsg server or not.

Returns:
true if this client is a cMsg server

getDeliverer

public cMsgDeliverMessageInterface getDeliverer()
Gets the object used to deliver messages to this client.

Returns:
object used to deliver messages to this client

setDeliverer

public void setDeliverer(cMsgDeliverMessageInterface deliverer)
Sets the object used to deliver messages to this client.

Parameters:
deliverer - object used to deliver messages to this client