Class SingleThreadHttpServer

    • Field Detail

      • running

        protected boolean running
        Stores the running flag.
      • serverProcessingThread

        protected Thread serverProcessingThread
        Stores the server acceptor thread.
      • serverPort

        protected int serverPort
        Stores the port we are listening on.
      • serverSocket

        protected ServerSocket serverSocket
        Stores the server socket.
      • serverStopRequest

        protected boolean serverStopRequest
        Stores the server stop request.
      • soTimeout

        protected int soTimeout
        Stores the SO_TIMEOUT.
    • Constructor Detail

      • SingleThreadHttpServer

        public SingleThreadHttpServer()
        Constructor.
      • SingleThreadHttpServer

        public SingleThreadHttpServer​(int serverPort)
        Constructor.
        Parameters:
        serverPort - the server port.
      • SingleThreadHttpServer

        public SingleThreadHttpServer​(int serverPort,
                                      HttpServerProcessor processor)
        Constructor
        Parameters:
        serverPort - the server port.
        processor - the HTTP server processor.