Class KawaHttpHandler

java.lang.Object
gnu.kawa.servlet.KawaHttpHandler
All Implemented Interfaces:
com.sun.net.httpserver.HttpHandler

public class KawaHttpHandler extends Object implements com.sun.net.httpserver.HttpHandler
Web server support glue built on JDK 6's built-in HttpServer.
  • Field Details

    • serverInstance

      public static com.sun.net.httpserver.HttpServer serverInstance
    • serverBacklog

      public static int serverBacklog
  • Constructor Details

    • KawaHttpHandler

      public KawaHttpHandler(String resourceRoot)
    • KawaHttpHandler

      public KawaHttpHandler(gnu.kawa.io.Path resourceRoot)
  • Method Details

    • handle

      public void handle(com.sun.net.httpserver.HttpExchange t) throws IOException
      Specified by:
      handle in interface com.sun.net.httpserver.HttpHandler
      Throws:
      IOException
    • getServerInstance

      public static com.sun.net.httpserver.HttpServer getServerInstance() throws IOException
      Throws:
      IOException
    • maybeStopServer

      public static void maybeStopServer()
    • addAutoHandler

      public static void addAutoHandler(String uriRoot, String resourceRoot) throws IOException
      Throws:
      IOException
    • addHandler

      public static com.sun.net.httpserver.HttpContext addHandler(String uriRoot, com.sun.net.httpserver.HttpHandler handler) throws IOException
      Throws:
      IOException
    • addStaticFileHandler

      public static void addStaticFileHandler(String uriRoot, String pathPrefix, String defaultUrl, boolean exitOnClose) throws IOException
      Throws:
      IOException
    • startServer

      public static com.sun.net.httpserver.HttpServer startServer(int port, PrintStream printPortHere) throws IOException
      Throws:
      IOException