Modifier and Type | Field and Description |
---|---|
protected Env |
env |
protected int |
port |
protected static int |
PORT_8080 |
protected static int |
RANDOM_PORT_START_RETRY |
protected static int |
RANDOM_PORTS_COUNT |
protected static int |
RANDOM_PORTS_LOWER_BOUND |
protected RoutesProvider |
routesProvider |
protected HttpServerWrapper |
server |
Modifier | Constructor and Description |
---|---|
protected |
AbstractWebServer() |
Modifier and Type | Method and Description |
---|---|
T |
configure(Configuration configuration) |
protected Env |
createEnv() |
protected abstract HttpServerWrapper |
createHttpServer(Handler httpHandler,
WebSocketHandler webSocketHandler) |
protected void |
handleHttp(Request request,
Response response) |
protected void |
handleWebSocket(WebSocketSession session,
Request request,
Response response) |
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 static final int PORT_8080
protected static final int RANDOM_PORT_START_RETRY
protected static final int RANDOM_PORTS_LOWER_BOUND
protected static final int RANDOM_PORTS_COUNT
protected final HttpServerWrapper server
protected final Env env
protected RoutesProvider routesProvider
protected int port
protected abstract HttpServerWrapper createHttpServer(Handler httpHandler, WebSocketHandler webSocketHandler)
protected Env createEnv()
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()
protected void handleWebSocket(WebSocketSession session, Request request, Response response)
public void stop()
Copyright © 2015. All Rights Reserved.