Package gnu.kawa.servlet
Class KawaHttpHandler
java.lang.Object
gnu.kawa.servlet.KawaHttpHandler
- All Implemented Interfaces:
HttpHandler
Web server support glue built on JDK 6's built-in HttpServer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKawaHttpHandler(gnu.kawa.io.Path resourceRoot) KawaHttpHandler(String resourceRoot) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAutoHandler(String uriRoot, String resourceRoot) static HttpContextaddHandler(String uriRoot, HttpHandler handler) static voidaddStaticFileHandler(String uriRoot, String pathPrefix, String defaultUrl, boolean exitOnClose) static HttpServervoidstatic voidstatic HttpServerstartServer(int port, PrintStream printPortHere)
-
Field Details
-
serverInstance
-
serverBacklog
public static int serverBacklog
-
-
Constructor Details
-
KawaHttpHandler
-
KawaHttpHandler
public KawaHttpHandler(gnu.kawa.io.Path resourceRoot)
-
-
Method Details
-
handle
- Specified by:
handlein interfaceHttpHandler- Throws:
IOException
-
getServerInstance
- Throws:
IOException
-
maybeStopServer
public static void maybeStopServer() -
addAutoHandler
- Throws:
IOException
-
addHandler
- Throws:
IOException
-
addStaticFileHandler
public static void addStaticFileHandler(String uriRoot, String pathPrefix, String defaultUrl, boolean exitOnClose) throws IOException - Throws:
IOException
-
startServer
- Throws:
IOException
-