Class ExecutableServer

java.lang.Object
java.lang.Thread
edu.jas.util.ExecutableServer
All Implemented Interfaces:
Runnable

public class ExecutableServer extends Thread
ExecutableServer is used to receive and execute classes.
Author:
Heinz Kredel
  • Field Details

  • Constructor Details

    • ExecutableServer

      public ExecutableServer()
      ExecutableServer on default port.
    • ExecutableServer

      public ExecutableServer(int port)
      ExecutableServer.
      Parameters:
      port -
    • ExecutableServer

      public ExecutableServer(ChannelFactory cf)
      ExecutableServer.
      Parameters:
      cf - channel factory to reuse.
  • Method Details

    • main

      public static void main(String[] args) throws InterruptedException
      main method to start serving thread.
      Parameters:
      args - args[0] is port
      Throws:
      InterruptedException
    • init

      public void init()
      thread initialization and start.
    • size

      public int size()
      number of servers.
    • run

      public void run()
      run is main server method.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • terminate

      public void terminate()
      terminate all servers.
    • toString

      public String toString()
      String representation.
      Overrides:
      toString in class Thread