Class BaseServerListener

All Implemented Interfaces:
Listener, Runnable

public class BaseServerListener extends BaseListener implements Listener
Derived class representing a listener for a server application. Implements the Listener interface and extends the BaseListener class.
  • Constructor Details

    • BaseServerListener

      public BaseServerListener(int portIn, StreamIO streamIO, TransportFactory transportFactory, MessageQueue<TransportConnection> requestQueue)
      Constructor for BaseServerListener.
      Parameters:
      portIn - The port number on which the listener will accept connections.
      streamIO - The StreamIO object for input/output operations.
      transportFactory - The TransportFactory for creating TransportConnections.
      requestQueue - The queue for storing incoming TransportConnections.
  • Method Details

    • worker

      protected void worker() throws IOException
      Worker method for the listener. Accepts incoming connections and adds them to the request queue for processing.
      Specified by:
      worker in class BaseListener
      Throws:
      IOException - if an I/O error occurs during connection acceptance.