Package edu.jas.util

Class DistributedListServer

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

public class DistributedListServer extends Thread
Server for the distributed version of a list.
  • Field Details

  • Constructor Details

    • DistributedListServer

      public DistributedListServer()
      Constructs a new DistributedListServer.
    • DistributedListServer

      public DistributedListServer(int port)
      DistributedListServer.
      Parameters:
      port - to run server on.
    • DistributedListServer

      public DistributedListServer(ChannelFactory cf)
      DistributedListServer.
      Parameters:
      cf - ChannelFactory to use.
  • Method Details

    • main

      public static void main(String[] args) throws InterruptedException
      main. Usage: DistributedListServer <port>
      Throws:
      InterruptedException
    • init

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

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

      public void terminate()
      terminate all servers.
    • size

      public int size()
      number of servers.