Class FD_SOCK.ServerSocketHandler

java.lang.Object
org.jgroups.protocols.FD_SOCK.ServerSocketHandler
All Implemented Interfaces:
Runnable
Enclosing class:
FD_SOCK

protected class FD_SOCK.ServerSocketHandler extends Object implements Runnable
Handles the server-side of a client-server socket connection. Waits until a client connects, and then loops until that client closes the connection. Note that there is no new thread spawned for the listening on the client socket, therefore there can only be 1 client connection at the same time. Subsequent clients attempting to create a connection will be blocked until the first client closes its connection. This should not be a problem as the ring nature of the FD_SOCK protocol always has only 1 client connect to its right-hand-side neighbor.
  • Field Details

  • Constructor Details

    • ServerSocketHandler

      protected ServerSocketHandler()
  • Method Details

    • getName

      protected String getName()
    • start

      protected void start()
    • stop

      protected void stop(boolean graceful)
    • run

      public void run()
      Only accepts 1 client connection at a time (saving threads)
      Specified by:
      run in interface Runnable