public class cMsgNameServer
extends java.lang.Thread
implements org.jlab.coda.cMsg.remoteExec.IExecutorThread
cMsgServerBridge and cMsg).| Constructor and Description |
|---|
cMsgNameServer(int port,
int domainPort,
int udpPort,
boolean standAlone,
boolean monitoringOff,
java.lang.String clientPassword,
java.lang.String cloudPassword,
java.lang.String serverToJoin,
int debug,
int clientsMax)
Constructor which reads environmental variables and opens listening sockets.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
Implement IExecutorThread interface so cMsgNameServer can be
run using the Commander/Executor framework.
|
int |
getCloudStatus()
Get the status of the relationship of this server to the cMsg subdomain
server cloud.
|
int |
getDomainPort()
Get the domain server's listening port.
|
java.lang.String |
getHost()
Get the host this server is running on.
|
int |
getMulticastPort()
Get name server's multicast listening port.
|
int |
getPort()
Get the name server's listening port.
|
java.lang.String |
getServerName()
Get this server's name (host:port).
|
static void |
main(java.lang.String[] args)
Run as a stand-alone application.
|
void |
printSizes()
This method prints out the sizes of all objects which store other objects.
|
void |
run()
This method is executed as a thread.
|
void |
shutItDown()
When a class implementing this interface is run by an Executor,
eventually a Commander may want to stop it.
|
void |
startItUp()
When a class implementing this interface is run by an Executor,
it calls this method to do so.
|
void |
startServer()
Method to start up this server and join the cMsg server cloud that
serverToJoin is a part of.
|
void |
waitUntilDone()
When a class implementing this interface is run by an Executor,
a Commander may want to wait until it finished running.
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic cMsgNameServer(int port,
int domainPort,
int udpPort,
boolean standAlone,
boolean monitoringOff,
java.lang.String clientPassword,
java.lang.String cloudPassword,
java.lang.String serverToJoin,
int debug,
int clientsMax)
port - TCP listening port for communication from clientsdomainPort - listening port for receiving 2 permanent connections from each clientudpPort - UDP listening port for receiving multicasts from clientsstandAlone - if true no other cMsg servers are allowed to attached to this one and form a cloudmonitoringOff - if true clients are NOT sent monitoring dataclientPassword - password client needs to provide to connect to this servercloudPassword - password server needs to provide to connect to this server to become part of a cloudserverToJoin - server whose cloud this server is to be joined todebug - desired level of debug outputclientsMax - max number of clients per cMsgDomainServerSelect object for regime = lowpublic int getCloudStatus()
INCLOUD, NONCLOUD,
or BECOMINGCLOUDpublic java.lang.String getServerName()
public java.lang.String getHost()
public int getPort()
public int getDomainPort()
public int getMulticastPort()
public void printSizes()
public static void main(java.lang.String[] args)
args - arguments.public void startItUp()
org.jlab.coda.cMsg.remoteExec.IExecutorThreadstartItUp in interface org.jlab.coda.cMsg.remoteExec.IExecutorThreadpublic void shutItDown()
org.jlab.coda.cMsg.remoteExec.IExecutorThreadshutItDown in interface org.jlab.coda.cMsg.remoteExec.IExecutorThreadpublic void waitUntilDone()
throws java.lang.InterruptedException
org.jlab.coda.cMsg.remoteExec.IExecutorThreadwaitUntilDone in interface org.jlab.coda.cMsg.remoteExec.IExecutorThreadjava.lang.InterruptedException - if thread interrupted.public void startServer()
public void cleanUp()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread