public class KawaHttpHandler
extends java.lang.Object
implements com.sun.net.httpserver.HttpHandler
Modifier and Type | Class and Description |
---|---|
static class |
KawaHttpHandler.Context |
static class |
KawaHttpHandler.StaticFileHandler |
Modifier and Type | Field and Description |
---|---|
static int |
serverBacklog |
static com.sun.net.httpserver.HttpServer |
serverInstance |
Constructor and Description |
---|
KawaHttpHandler(gnu.kawa.io.Path resourceRoot) |
KawaHttpHandler(java.lang.String resourceRoot) |
Modifier and Type | Method and Description |
---|---|
static void |
addAutoHandler(java.lang.String uriRoot,
java.lang.String resourceRoot) |
static com.sun.net.httpserver.HttpContext |
addHandler(java.lang.String uriRoot,
com.sun.net.httpserver.HttpHandler handler) |
static void |
addStaticFileHandler(java.lang.String uriRoot,
java.lang.String pathPrefix,
java.lang.String defaultUrl,
boolean exitOnClose) |
static com.sun.net.httpserver.HttpServer |
getServerInstance() |
void |
handle(com.sun.net.httpserver.HttpExchange t) |
static void |
maybeStopServer() |
static com.sun.net.httpserver.HttpServer |
startServer(int port,
java.io.PrintStream printPortHere) |
public static com.sun.net.httpserver.HttpServer serverInstance
public static int serverBacklog
public KawaHttpHandler(java.lang.String resourceRoot)
public KawaHttpHandler(gnu.kawa.io.Path resourceRoot)
public void handle(com.sun.net.httpserver.HttpExchange t) throws java.io.IOException
handle
in interface com.sun.net.httpserver.HttpHandler
java.io.IOException
public static com.sun.net.httpserver.HttpServer getServerInstance() throws java.io.IOException
java.io.IOException
public static void maybeStopServer()
public static void addAutoHandler(java.lang.String uriRoot, java.lang.String resourceRoot) throws java.io.IOException
java.io.IOException
public static com.sun.net.httpserver.HttpContext addHandler(java.lang.String uriRoot, com.sun.net.httpserver.HttpHandler handler) throws java.io.IOException
java.io.IOException
public static void addStaticFileHandler(java.lang.String uriRoot, java.lang.String pathPrefix, java.lang.String defaultUrl, boolean exitOnClose) throws java.io.IOException
java.io.IOException
public static com.sun.net.httpserver.HttpServer startServer(int port, java.io.PrintStream printPortHere) throws java.io.IOException
java.io.IOException