Class KawaHttpHandler
java.lang.Object
gnu.kawa.servlet.KawaHttpHandler
- All Implemented Interfaces:
com.sun.net.httpserver.HttpHandler
Web server support glue built on JDK 6's built-in HttpServer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic com.sun.net.httpserver.HttpServer -
Constructor Summary
ConstructorsConstructorDescriptionKawaHttpHandler(gnu.kawa.io.Path resourceRoot) KawaHttpHandler(String resourceRoot) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAutoHandler(String uriRoot, String resourceRoot) static com.sun.net.httpserver.HttpContextaddHandler(String uriRoot, com.sun.net.httpserver.HttpHandler handler) static voidaddStaticFileHandler(String uriRoot, String pathPrefix, String defaultUrl, boolean exitOnClose) static com.sun.net.httpserver.HttpServervoidhandle(com.sun.net.httpserver.HttpExchange t) static voidstatic com.sun.net.httpserver.HttpServerstartServer(int port, PrintStream printPortHere)
-
Field Details
-
serverInstance
public static com.sun.net.httpserver.HttpServer serverInstance -
serverBacklog
public static int serverBacklog
-
-
Constructor Details
-
KawaHttpHandler
-
KawaHttpHandler
public KawaHttpHandler(gnu.kawa.io.Path resourceRoot)
-
-
Method Details
-
handle
- Specified by:
handlein interfacecom.sun.net.httpserver.HttpHandler- Throws:
IOException
-
getServerInstance
- Throws:
IOException
-
maybeStopServer
public static void maybeStopServer() -
addAutoHandler
- 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
-