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 java.util.concurrent.ExecutorService |
executorService |
protected static org.slf4j.Logger |
LOG |
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 java.util.concurrent.ExecutorService |
createExecutorService() |
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 static final org.slf4j.Logger LOG
protected final Env env
protected final CompilerFacade compilers
protected final java.util.concurrent.ExecutorService executorService
protected HttpServerWrapper server
protected RoutesProvider routesProvider
protected int port
protected abstract HttpServerWrapper createHttpServer(Handler handler) throws java.lang.Exception
java.lang.Exceptionpublic 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()
protected java.util.concurrent.ExecutorService createExecutorService()
Copyright © 2014. All Rights Reserved.