public class cMsgClientInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
clientHost
Client's host.
|
protected cMsgMessageDeliverer |
deliverer
Object for delivering messges to this client.
|
protected java.lang.String |
description
Client supplied description.
|
protected java.lang.String |
domainHost
Domain server's host.
|
protected int |
domainPort
Domain server's TCP port.
|
protected int |
domainUdpPort
Domain server's UDP port.
|
protected java.lang.String |
dottedDecimalAddr
Client's address in dotted decimal form.
|
protected boolean |
isServer
Is this client another cMsg server?
|
protected java.nio.channels.SocketChannel |
messageChannel
Socket channel used to get messages to and receive messages/requests from client.
|
protected int |
multicastPort
If this client is a cMsg server, this quantity is the UDP multicast port
of the server which has just become a client of cMsg server where this
object lives.
|
protected java.lang.String |
name
Client's name.
|
protected java.lang.String |
namespace
cMsg subdomain namespace client is using.
|
protected int |
serverPort
If this client is a cMsg server, this quantity is the TCP listening port
of the server which has just become a client of cMsg server where this
object lives.
|
protected java.lang.String |
subdomain
Subdomain client wishes to use.
|
protected java.lang.String |
UDL
Client supplied UDL.
|
protected java.lang.String |
UDLremainder
Remainder from client's UDL.
|
Constructor and Description |
---|
cMsgClientInfo()
Default constructor.
|
cMsgClientInfo(java.lang.String name,
int nsPort,
int mPort,
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 dPort,
java.lang.String host,
java.lang.String dotDec,
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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClientHost()
Gets host client is running on.
|
cMsgMessageDeliverer |
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 |
getDottedDecimalAddr()
Gets client's address in dotted decimal form.
|
java.nio.channels.SocketChannel |
getMessageChannel()
Gets the SocketChannel used to send messages to and receives messages/requests from this client.
|
java.net.InetSocketAddress |
getMessageChannelRemoteSocketAddress()
Gets the InetAddress object of the client end of the socket the client uses for
sending/receiving messages to/from server.
|
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 |
getServerMulticastPort()
Gets the UDP multicasting port the connecting name server (client of this server)
is listening 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(cMsgMessageDeliverer 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 |
setMessageChannel(java.nio.channels.SocketChannel messageChannel)
Sets the SocketChannel used to send messages to and receives messages/requests from this client.
|
void |
setNamespace(java.lang.String namespace)
Sets the namespace of client's cMsg subdomain.
|
protected java.lang.String name
protected java.lang.String dottedDecimalAddr
protected java.lang.String description
protected java.lang.String UDL
protected java.lang.String UDLremainder
protected java.lang.String subdomain
protected java.lang.String namespace
protected java.lang.String clientHost
protected java.lang.String domainHost
protected int domainPort
protected int domainUdpPort
protected boolean isServer
protected int serverPort
protected int multicastPort
protected java.nio.channels.SocketChannel messageChannel
protected cMsgMessageDeliverer deliverer
public cMsgClientInfo()
public cMsgClientInfo(java.lang.String name, int nsPort, int dPort, java.lang.String host, java.lang.String dotDec, java.lang.String subdomain, java.lang.String UDLRemainder, java.lang.String UDL, java.lang.String description)
name
- client's namedotDec
- client's address in dotted decimal formnsPort
- name server's listening portdPort
- domain server's listening porthost
- client's hostsubdomain
- client's subdomainUDLRemainder
- client's UDL's remainderUDL
- client's UDLdescription
- client's descriptionpublic cMsgClientInfo(java.lang.String name, int nsPort, int mPort, java.lang.String host)
name
- client's namensPort
- name server's TCP listening portmPort
- name server's UDP multicast listening porthost
- client's hostpublic java.lang.String getName()
public java.lang.String getDottedDecimalAddr()
public java.lang.String getDescription()
public java.lang.String getUDL()
public java.lang.String getUDLremainder()
public java.lang.String getSubdomain()
public java.lang.String getNamespace()
public void setNamespace(java.lang.String namespace)
namespace
- namespace of client's cMsg subdomainpublic java.lang.String getClientHost()
public java.lang.String getDomainHost()
public void setDomainHost(java.lang.String domainHost)
domainHost
- host domain server is running onpublic int getDomainPort()
public void setDomainPort(int domainPort)
domainPort
- TCP port domain server is listening onpublic int getDomainUdpPort()
public void setDomainUdpPort(int domainUdpPort)
domainUdpPort
- TCP port domain server is listening onpublic java.lang.String getServerHost()
public int getServerPort()
public int getServerMulticastPort()
public boolean isServer()
public java.nio.channels.SocketChannel getMessageChannel()
public void setMessageChannel(java.nio.channels.SocketChannel messageChannel)
messageChannel
- the SocketChannel used to send messages to and receives
messages/requests from this clientpublic java.net.InetSocketAddress getMessageChannelRemoteSocketAddress()
public cMsgMessageDeliverer getDeliverer()
public void setDeliverer(cMsgMessageDeliverer deliverer)
deliverer
- object used to deliver messages to this client