Class JettyHttpServer


  • public class JettyHttpServer
    extends com.sun.net.httpserver.HttpServer
    Jetty implementation of HttpServer.
    • Constructor Summary

      Constructors 
      Constructor Description
      JettyHttpServer​(org.eclipse.jetty.server.Server server, boolean shared)  
      JettyHttpServer​(org.eclipse.jetty.server.Server server, boolean shared, org.eclipse.jetty.server.HttpConfiguration configuration)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(java.net.InetSocketAddress addr, int backlog)  
      com.sun.net.httpserver.HttpContext createContext​(java.lang.String path)  
      com.sun.net.httpserver.HttpContext createContext​(java.lang.String path, com.sun.net.httpserver.HttpHandler httpHandler)  
      java.net.InetSocketAddress getAddress()  
      java.util.concurrent.Executor getExecutor()  
      org.eclipse.jetty.server.HttpConfiguration getHttpConfiguration()  
      protected org.eclipse.jetty.server.Server getServer()  
      protected org.eclipse.jetty.server.ServerConnector newServerConnector​(java.net.InetSocketAddress addr, int backlog)  
      void removeContext​(com.sun.net.httpserver.HttpContext context)  
      void removeContext​(java.lang.String path)  
      void setExecutor​(java.util.concurrent.Executor executor)  
      void start()  
      void stop​(int delay)  
      • Methods inherited from class com.sun.net.httpserver.HttpServer

        create, create
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JettyHttpServer

        public JettyHttpServer​(org.eclipse.jetty.server.Server server,
                               boolean shared)
      • JettyHttpServer

        public JettyHttpServer​(org.eclipse.jetty.server.Server server,
                               boolean shared,
                               org.eclipse.jetty.server.HttpConfiguration configuration)
    • Method Detail

      • getHttpConfiguration

        public org.eclipse.jetty.server.HttpConfiguration getHttpConfiguration()
      • bind

        public void bind​(java.net.InetSocketAddress addr,
                         int backlog)
                  throws java.io.IOException
        Specified by:
        bind in class com.sun.net.httpserver.HttpServer
        Throws:
        java.io.IOException
      • getServer

        protected org.eclipse.jetty.server.Server getServer()
      • newServerConnector

        protected org.eclipse.jetty.server.ServerConnector newServerConnector​(java.net.InetSocketAddress addr,
                                                                              int backlog)
      • getAddress

        public java.net.InetSocketAddress getAddress()
        Specified by:
        getAddress in class com.sun.net.httpserver.HttpServer
      • start

        public void start()
        Specified by:
        start in class com.sun.net.httpserver.HttpServer
      • setExecutor

        public void setExecutor​(java.util.concurrent.Executor executor)
        Specified by:
        setExecutor in class com.sun.net.httpserver.HttpServer
      • getExecutor

        public java.util.concurrent.Executor getExecutor()
        Specified by:
        getExecutor in class com.sun.net.httpserver.HttpServer
      • stop

        public void stop​(int delay)
        Specified by:
        stop in class com.sun.net.httpserver.HttpServer
      • createContext

        public com.sun.net.httpserver.HttpContext createContext​(java.lang.String path,
                                                                com.sun.net.httpserver.HttpHandler httpHandler)
        Specified by:
        createContext in class com.sun.net.httpserver.HttpServer
      • createContext

        public com.sun.net.httpserver.HttpContext createContext​(java.lang.String path)
        Specified by:
        createContext in class com.sun.net.httpserver.HttpServer
      • removeContext

        public void removeContext​(java.lang.String path)
                           throws java.lang.IllegalArgumentException
        Specified by:
        removeContext in class com.sun.net.httpserver.HttpServer
        Throws:
        java.lang.IllegalArgumentException
      • removeContext

        public void removeContext​(com.sun.net.httpserver.HttpContext context)
        Specified by:
        removeContext in class com.sun.net.httpserver.HttpServer