public interface WebServer
started
and stopped
.Modifier and Type | Method and Description |
---|---|
int |
getPort()
Return the port this server is listening on.
|
default boolean |
shutDownGracefully()
Gracefully shuts down the web server by preventing the handling of new requests and
waiting for a configurable period for there to be no active requests.
|
void |
start()
Starts the web server.
|
void |
stop()
Stops the web server.
|
void start() throws WebServerException
WebServerException
- if the server cannot be startedvoid stop() throws WebServerException
WebServerException
- if the server cannot be stoppedint getPort()
default boolean shutDownGracefully()
true
if graceful shutdown completed within the period, otherwise
false