Class NMConnector

java.lang.Object
java.lang.Thread
com.nt.udc.admin.server.NMConnector
All Implemented Interfaces:
Runnable

public class NMConnector extends Thread
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.
  • Constructor Details

    • NMConnector

      public NMConnector(AdminServerImpl as, long wait, String inIP, int inPort)
      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.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • shutdown

      public void shutdown()
      shutdown method for this thread