Modifier and Type | Field and Description |
---|---|
protected Env |
env |
protected int |
port |
protected RoutesProvider |
routesProvider |
protected HttpServerWrapper |
server |
Modifier | Constructor and Description |
---|---|
protected |
AbstractWebServer() |
Modifier and Type | Method and Description |
---|---|
T |
configure(Configuration configuration) |
protected void |
connectWebSocket(WebSocketSession session,
Request request,
Response response) |
protected Env |
createEnv() |
protected abstract HttpServerWrapper |
createHttpServer(Handler httpHandler,
WebSocketHandler webSocketHandler) |
protected Payload |
errorPage(Exception e) |
protected Payload |
errorPage(Payload payload) |
protected Payload |
errorPage(Payload payload,
Exception e) |
protected void |
handleHttp(Request request,
Response response) |
protected void |
handleServerError(PayloadWriter payloadWriter,
Exception e) |
int |
port() |
T |
start() |
T |
start(int port) |
T |
startOnRandomPort() |
T |
startSSL(int port,
List<java.nio.file.Path> pathChain,
java.nio.file.Path pathPrivateKey) |
T |
startSSL(int port,
List<java.nio.file.Path> pathChain,
java.nio.file.Path pathPrivateKey,
List<java.nio.file.Path> pathTrustAnchors) |
T |
startSSL(int port,
java.nio.file.Path pathCertificate,
java.nio.file.Path pathPrivateKey) |
protected T |
startWithContext(int port,
SSLContext context,
boolean authReq) |
void |
stop() |
protected final Env env
protected HttpServerWrapper server
protected RoutesProvider routesProvider
protected int port
protected abstract HttpServerWrapper createHttpServer(Handler httpHandler, WebSocketHandler webSocketHandler) throws Exception
Exception
public T configure(Configuration configuration)
public T startOnRandomPort()
public T start()
public T start(int port)
public T startSSL(int port, java.nio.file.Path pathCertificate, java.nio.file.Path pathPrivateKey)
public T startSSL(int port, List<java.nio.file.Path> pathChain, java.nio.file.Path pathPrivateKey)
public T startSSL(int port, List<java.nio.file.Path> pathChain, java.nio.file.Path pathPrivateKey, List<java.nio.file.Path> pathTrustAnchors)
protected T startWithContext(int port, SSLContext context, boolean authReq)
public int port()
public void stop()
protected void connectWebSocket(WebSocketSession session, Request request, Response response)
protected void handleServerError(PayloadWriter payloadWriter, Exception e)
protected Env createEnv()
Copyright © 2015. All Rights Reserved.