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 class
static class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKawaHttpHandler
(gnu.kawa.io.Path resourceRoot) KawaHttpHandler
(String resourceRoot) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAutoHandler
(String uriRoot, String resourceRoot) static HttpContext
addHandler
(String uriRoot, HttpHandler handler) static void
addStaticFileHandler
(String uriRoot, String pathPrefix, String defaultUrl, boolean exitOnClose) static HttpServer
void
static void
static HttpServer
startServer
(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:
handle
in 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
-