Class BaseServer

java.lang.Object
com.example.server.app.BaseServer
All Implemented Interfaces:
Server

public class BaseServer extends Object implements Server
The BaseServer class implements the Server interface and represents the core server application.
  • Constructor Details

    • BaseServer

      public BaseServer(int port, StreamIO streamIO, TransportFactory transportFactory)
      Constructor for BaseServer.
      Parameters:
      port - The port on which the server will listen for connections.
      streamIO - The StreamIO object for handling input/output operations.
      transportFactory - The TransportFactory for creating TransportConnections.
  • Method Details

    • start

      public void start()
      Start server
      Specified by:
      start in interface Server
    • stop

      public void stop()
      Stop server
      Specified by:
      stop in interface Server