Package org.jrd.agent

Class ConnectionDelegator

java.lang.Object
java.lang.Thread
org.jrd.agent.ConnectionDelegator
All Implemented Interfaces:
Runnable

public final class ConnectionDelegator extends Thread
  • Field Details

  • Constructor Details

  • Method Details

    • initialize

      public static void initialize(String hostname, Integer port, InstrumentationProvider provider, String loneliness) throws IOException
      This method is used to create an ConnectionDelegator object and start listener thread
      Parameters:
      hostname - host name to open communication with
      port - on which open socket
      provider - this is where instrumentation and transformer objects are stored
      Throws:
      IOException
    • run

      public void run()
      Waits for new connection. When client connects starts new worker thread and delegates connection to it
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • setRunning

      private static void setRunning(boolean isRunning)
    • gracefulShutdown

      public static void gracefulShutdown()
      Closes server socket Already connected clients can finish their work but no new clients can connect.