|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.jlab.coda.cMsg.cMsgDomain.server.cMsgNameServer
public class cMsgNameServer
This class implements a cMsg name server in the cMsg domain.
A word of caution. If multiple cMsgNameServer objects exist in
a single JVM and they both service clients in the cMsg subdomain,
then there will be undesirable effects. In other words, the
cMsg subdomain uses static data in some of its implementing
classes (cMsgServerBridge
& cMsg
).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Thread |
---|
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, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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 = lowMethod Detail |
---|
public int getCloudStatus()
INCLOUD
, NONCLOUD
,
or BECOMINGCLOUD
public 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)
public void startItUp()
org.jlab.coda.cMsg.remoteExec.IExecutorThread
startItUp
in interface org.jlab.coda.cMsg.remoteExec.IExecutorThread
public void shutItDown()
org.jlab.coda.cMsg.remoteExec.IExecutorThread
shutItDown
in interface org.jlab.coda.cMsg.remoteExec.IExecutorThread
public void waitUntilDone() throws java.lang.InterruptedException
org.jlab.coda.cMsg.remoteExec.IExecutorThread
waitUntilDone
in interface org.jlab.coda.cMsg.remoteExec.IExecutorThread
java.lang.InterruptedException
public void startServer()
public void cleanUp()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |