Package com.nt.udc.admin.server
Class NMConnector
java.lang.Object
java.lang.Thread
com.nt.udc.admin.server.NMConnector
- All Implemented Interfaces:
Runnable
NMConnector
Extending Thread, this class is responsible for initiating a
connection to a Node Manager from the given Admin Server. It will
periodically 'call back' to the given Admin Server, instructing the
server to make a connection to a Node Manager. The thread will stay
alive until a connection is made.
At startup of the Admin Server, an instance of this class will be
spawned for each Node Manager currently being administered.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionNMConnector
(AdminServerImpl as, long wait, String inIP, int inPort) NMConnector Constructor Construct a thread which will initiate a connection to the given Node Manager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
This method initiates the connection attempt to the Node Manager.void
setInterval
(long wait) Set the number of seconds between connection attemptsvoid
shutdown()
shutdown method for this threadMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
NMConnector
NMConnector Constructor Construct a thread which will initiate a connection to the given Node Manager.- Parameters:
as
- The Admin Server which spawned this thread.wait
- The number of seconds between connection attempts.inIP
- The IP address of the Node Manager to which to connect.inPort
- The RMI port of the Node Manager to which to connect.
-
-
Method Details
-
setInterval
public void setInterval(long wait) Set the number of seconds between connection attempts- Parameters:
wait
- The number of seconds between connection attempts.
-
run
public void run()This method initiates the connection attempt to the Node Manager. It will 'call back' to the Admin Server, instructing it to attempt to make a connection to the Node Manager at the specified IP address and port. Once a connection has been established, this thread will die. -
shutdown
public void shutdown()shutdown method for this thread
-