public abstract class AbstractWebServer<T extends AbstractWebServer<T>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected CompilerFacade |
compilers |
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(java.lang.Class<? extends Configuration> configuration) |
T |
configure(Configuration configuration) |
protected CompilerFacade |
createCompilerFacade() |
protected Env |
createEnv() |
protected abstract HttpServerWrapper |
createHttpServer(Handler handler) |
protected Payload |
errorPage(java.lang.Exception e) |
protected Payload |
errorPage(Payload payload) |
protected Payload |
errorPage(Payload payload,
java.lang.Exception e) |
protected void |
handle(Request request,
Response response) |
protected void |
handleServerError(PayloadWriter payloadWriter,
java.lang.Exception e) |
int |
port() |
T |
start() |
T |
start(int port) |
T |
startOnRandomPort() |
T |
startSSL(int port,
java.util.List<java.nio.file.Path> pathChain,
java.nio.file.Path pathPrivateKey) |
T |
startSSL(int port,
java.util.List<java.nio.file.Path> pathChain,
java.nio.file.Path pathPrivateKey,
java.util.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,
javax.net.ssl.SSLContext context,
boolean authReq) |
void |
stop() |
protected final Env env
protected final CompilerFacade compilers
protected HttpServerWrapper server
protected RoutesProvider routesProvider
protected int port
protected abstract HttpServerWrapper createHttpServer(Handler handler) throws java.lang.Exception
java.lang.Exception
public T configure(Configuration configuration)
public T configure(java.lang.Class<? extends 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, java.util.List<java.nio.file.Path> pathChain, java.nio.file.Path pathPrivateKey)
public T startSSL(int port, java.util.List<java.nio.file.Path> pathChain, java.nio.file.Path pathPrivateKey, java.util.List<java.nio.file.Path> pathTrustAnchors)
protected T startWithContext(int port, javax.net.ssl.SSLContext context, boolean authReq)
public int port()
public void stop()
protected void handleServerError(PayloadWriter payloadWriter, java.lang.Exception e)
protected Payload errorPage(java.lang.Exception e)
protected Env createEnv()
protected CompilerFacade createCompilerFacade()
Copyright © 2014. All Rights Reserved.