Class HTTPServer

    • Field Detail

      • DEFAULT_TIMEOUT

        public static final int DEFAULT_TIMEOUT
        Default timeout connection for HTTP comunication
        Since:
        1.8
        See Also:
        Constant Field Values
      • timeout

        protected int timeout
        Store the current TCP timeout value The variable should be accessed by getter and setter metho
    • Constructor Detail

      • HTTPServer

        public HTTPServer()
    • Method Detail

      • getName

        public static String getName()
      • getBindAddress

        public String getBindAddress()
      • getBindPort

        public int getBindPort()
      • getTimeout

        public int getTimeout()
        Get the current socket timeout
        Since:
        1.8
      • setTimeout

        public void setTimeout​(int timeout)
        Set the current socket timeout
        Parameters:
        timeout -
        Since:
        1.8
      • open

        public boolean open​(InetAddress addr,
                            int port)
      • open

        public boolean open​(String addr,
                            int port)
      • close

        public boolean close()
      • accept

        public Socket accept()
      • isOpened

        public boolean isOpened()
      • performRequestListener

        public void performRequestListener​(HTTPRequest httpReq)
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • start

        public boolean start()
      • stop

        public boolean stop()