public class WebServer
extends java.lang.Object
Constructor and Description |
---|
WebServer() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyRoutes(com.sun.net.httpserver.HttpExchange exchange) |
WebServer |
configure(Configuration configuration) |
protected boolean |
devMode() |
protected Payload |
errorPage(int code,
java.lang.Exception e) |
protected void |
hotReloadConfigurationInDevMode() |
static void |
main(java.lang.String[] args) |
protected void |
onError(java.lang.Exception e,
com.sun.net.httpserver.HttpExchange exchange) |
protected void |
onPageNotFound(Match match,
com.sun.net.httpserver.HttpExchange exchange) |
protected void |
onRequest(com.sun.net.httpserver.HttpExchange exchange) |
int |
port() |
void |
reset() |
WebServer |
start(int port) |
WebServer |
startOnRandomPort() |
void |
stop() |
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public WebServer configure(Configuration configuration)
public WebServer startOnRandomPort()
public WebServer start(int port)
public int port()
public void reset()
public void stop()
protected void onRequest(com.sun.net.httpserver.HttpExchange exchange)
protected void applyRoutes(com.sun.net.httpserver.HttpExchange exchange) throws java.io.IOException
java.io.IOException
protected void onPageNotFound(Match match, com.sun.net.httpserver.HttpExchange exchange) throws java.io.IOException
java.io.IOException
protected void onError(java.lang.Exception e, com.sun.net.httpserver.HttpExchange exchange) throws java.io.IOException
java.io.IOException
protected Payload errorPage(int code, java.lang.Exception e) throws java.io.IOException
java.io.IOException
protected boolean devMode()
protected void hotReloadConfigurationInDevMode()
Copyright © 2013. All Rights Reserved.