public abstract class HttpServerAdapter extends Object implements HttpServer
Primary responsibility is error handling across lifecycle.
See HttpServerHelper
for composable helper methods to use in implementations.
Modifier and Type | Field and Description |
---|---|
protected ApplicationSPI |
app |
protected DevShellSPI |
devSpi |
Modifier | Constructor and Description |
---|---|
protected |
HttpServerAdapter() |
protected |
HttpServerAdapter(ApplicationSPI app, DevShellSPI devSpi) |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate the Werval Http Server.
|
protected void |
activateHttpServer()
Override this method and activate your HttpServer implementation in it.
|
void |
passivate()
Passivate the Werval Http Server.
|
protected void |
passivateHttpServer()
Override this method and passivate your HttpServer implementation in it.
|
void |
registerPassivationShutdownHook()
Register a JVM shutdown hook to passivate the HttpServer.
|
void |
setApplicationSPI(ApplicationSPI application)
Set the Application SPI.
|
void |
setDevShellSPI(DevShellSPI devSpi)
Set the Development Shell SPI.
|
protected ApplicationSPI app
protected DevShellSPI devSpi
protected HttpServerAdapter()
protected HttpServerAdapter(ApplicationSPI app, DevShellSPI devSpi)
public final void setApplicationSPI(ApplicationSPI application)
HttpServer
setApplicationSPI
in interface
HttpServer
application
- ApplicationSPI
public final void setDevShellSPI(DevShellSPI devSpi)
HttpServer
setDevShellSPI
in interface
HttpServer
devSpi
- DevShell SPI
public final void activate()
HttpServer
activate
in interface
HttpServer
public final void passivate()
HttpServer
passivate
in interface
HttpServer
protected void activateHttpServer()
protected void passivateHttpServer()
public final void registerPassivationShutdownHook()
HttpServer
This method can be called ony once.
registerPassivationShutdownHook
in interface
HttpServer