Class HttpServer


  • public class HttpServer
    extends java.lang.Object
    Since:
    4.4
    • Field Detail

      • port

        private final int port
      • ifAddress

        private final java.net.InetAddress ifAddress
      • serverSocketFactory

        private final javax.net.ServerSocketFactory serverSocketFactory
      • listenerExecutorService

        private final java.util.concurrent.ThreadPoolExecutor listenerExecutorService
      • workerThreads

        private final java.lang.ThreadGroup workerThreads
      • status

        private final java.util.concurrent.atomic.AtomicReference<HttpServer.Status> status
      • serverSocket

        private volatile java.net.ServerSocket serverSocket
    • Method Detail

      • getInetAddress

        public java.net.InetAddress getInetAddress()
      • getLocalPort

        public int getLocalPort()
      • start

        public void start()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • stop

        public void stop()
      • awaitTermination

        public void awaitTermination​(long timeout,
                                     java.util.concurrent.TimeUnit timeUnit)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • shutdown

        public void shutdown​(long gracePeriod,
                             java.util.concurrent.TimeUnit timeUnit)