gnu.kawa.servlet
Class KawaHttpHandler

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

public class KawaHttpHandler
extends java.lang.Object
implements com.sun.net.httpserver.HttpHandler

Web server support glue built on JDK 6's built-in HttpServer.


Nested Class Summary
static class KawaHttpHandler.Context
           
 
Field Summary
static int serverBacklog
           
static com.sun.net.httpserver.HttpServer serverInstance
           
 
Constructor Summary
KawaHttpHandler(Path resourceRoot)
           
KawaHttpHandler(java.lang.String resourceRoot)
           
 
Method Summary
static void addAutoHandler(java.lang.String uriRoot, java.lang.String resourceRoot)
           
static com.sun.net.httpserver.HttpServer getServerInstance()
           
 void handle(com.sun.net.httpserver.HttpExchange t)
           
static void startServer(int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverInstance

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

serverBacklog

public static int serverBacklog
Constructor Detail

KawaHttpHandler

public KawaHttpHandler(java.lang.String resourceRoot)

KawaHttpHandler

public KawaHttpHandler(Path resourceRoot)
Method Detail

handle

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

getServerInstance

public static com.sun.net.httpserver.HttpServer getServerInstance()
                                                           throws java.io.IOException
Throws:
java.io.IOException

addAutoHandler

public static void addAutoHandler(java.lang.String uriRoot,
                                  java.lang.String resourceRoot)
                           throws java.io.IOException
Throws:
java.io.IOException

startServer

public static void startServer(int port)
                        throws java.io.IOException
Throws:
java.io.IOException