public class cMsgServerFinder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
cMsgServerFinder.cMsgFinder
Class to find cmsg name servers.
|
(package private) class |
cMsgServerFinder.cMsgMulticaster
This class defines a thread to multicast a single UDP packet to
cmsg name servers.
|
(package private) class |
cMsgServerFinder.cMsgMulticastReceiver
This class gets any response to our UDP multicast to cmsg name servers.
|
(package private) class |
cMsgServerFinder.rcFinder
Class to find rc multicast servers.
|
(package private) class |
cMsgServerFinder.rcMulticaster
This class defines a thread to multicast a single UDP packet to
rc multicast servers.
|
(package private) class |
cMsgServerFinder.rcMulticastReceiver
This class gets any response to our UDP multicast to rc multicast servers.
|
(package private) class |
cMsgServerFinder.ResponderInfo
Class to store info from a multicast responder.
|
Constructor and Description |
---|
cMsgServerFinder()
Constructor.
|
cMsgServerFinder(int debug)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCmsgPort(int port)
Add a UDP port to the user-specified list of ports to be probed
for cmsg name servers.
|
void |
addCmsgPorts(java.util.Collection<java.lang.Integer> col)
Add a collection of UDP ports to the list of user-specified ports to be
probed for cmsg name servers.
|
void |
addRcPort(int port)
Add a UDP port to the list of ports to be probed for rc multicast servers.
|
void |
addRcPorts(java.util.Collection<java.lang.Integer> col)
Add a collection of UDP ports to the list of ports to be probed for rc multicast servers.
|
void |
find()
Find all reachable cmsg name servers and rc multicast servers by multicasting.
|
void |
findCmsgServers()
Find all reachable cmsg name servers by multicasting.
|
void |
findRcServers()
Find all reachable rc multicast servers by multicasting.
|
cMsgMessage[] |
getCmsgServers()
Return an array of cMsg messages contains payload items of the cmsg name servers
information found in the last search.
|
java.lang.String |
getCmsgServersXML()
Return a string in XML format of the cmsg name servers
found in the last search.
|
java.lang.String |
getPassword()
Get the password for connecting to a cmsg name server.
|
cMsgMessage[] |
getRcServers()
Return an array of cMsg messages contains payload items of the rc multicast servers
information found in the last search.
|
java.lang.String |
getRcServersXML()
Return a string in XML format of the rc multicast servers
found in the last search.
|
int |
getSleepTime()
Get the time to wait for server responses in milliseconds.
|
boolean |
needsUpdate()
Tells caller if
find() needs to be called since the
server search parameters (eg. |
void |
print()
Print out the cmsg name servers and rc multicast servers found in the last search.
|
void |
removeCmsgPort(int port)
Remove a user-specified UDP port from the list of ports to be probed
for cmsg name servers.
|
void |
removeCmsgPorts()
Remove all user-specified UDP ports from list of ports to be probed
for cmsg name servers.
|
void |
removeRcPort(int port)
Remove a UDP port from the list of user-specified ports to be probed
for rc multicast servers.
|
void |
removeRcPorts()
Remove all user-specified UDP ports from list of ports to be
probed for rc multicast servers.
|
(package private) void |
setDebug(int debug)
Set level of debug output.
|
void |
setPassword(java.lang.String password)
Set the password for connecting to a cmsg name server.
|
void |
setSleepTime(int sleepTime)
Set the time to wait for server responses in milliseconds.
|
java.lang.String |
toString()
Return a string in XML format of the cmsg name servers and rc multicast servers
found in the last search.
|
public cMsgServerFinder()
public cMsgServerFinder(int debug)
debug
- level of debug outputpublic int getSleepTime()
public void setSleepTime(int sleepTime)
sleepTime
- time to wait for server responses in milliseconds.
Negative value resets to default (3 sec).void setDebug(int debug)
cMsgConstants.debugNone
for no outuput
cMsgConstants.debugSevere
for severe error output
cMsgConstants.debugError
for all error output
cMsgConstants.debugWarn
for warning and error output
cMsgConstants.debugInfo
for information, warning, and error output
debug
- level of debug outputpublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- value to set password withpublic void addRcPort(int port)
port
- UDP port to be probed for rc multicast serverspublic void addRcPorts(java.util.Collection<java.lang.Integer> col)
col
- collection of UDP ports to be probed for rc multicast serverspublic void removeRcPort(int port)
port
- UDP port to be removed from probing for rc multicast serverspublic void removeRcPorts()
public void addCmsgPort(int port)
port
- UDP port to be probed for cmsg name serverspublic void addCmsgPorts(java.util.Collection<java.lang.Integer> col)
col
- collection of UDP ports to be probed for cmsg name serverspublic void removeCmsgPort(int port)
port
- UDP port to be removed from probing for cmsg name serverspublic void removeCmsgPorts()
public boolean needsUpdate()
find()
needs to be called since the
server search parameters (eg. expid, ports) have been changed or added to.public void findCmsgServers()
toString()
,
getCmsgServers()
, or getCmsgServersXML()
in order to see the results of the search.public void findRcServers()
toString()
or
getRcServers()
, or getRcServersXML()
in order to see the results of the search.public void find()
toString()
in order to see the
results of the search.public void print()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCmsgServersXML()
public java.lang.String getRcServersXML()
public cMsgMessage[] getCmsgServers()
public cMsgMessage[] getRcServers()