public class UndertowWebServer extends java.lang.Object implements WebServer
WebServer that can be used to control an Undertow web server. Usually this class should be created using a ConfigurableUndertowWebServerFactory and not directly.
| Constructor and description |
|---|
UndertowWebServer(Builder builder, boolean autoStart)Create a new UndertowWebServer instance. |
UndertowWebServer(Builder builder, java.lang.Iterable<HttpHandlerFactory> httpHandlerFactories, boolean autoStart)Create a new UndertowWebServer instance. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected HttpHandler |
createHttpHandler() |
|
public int |
getPort() |
|
protected java.lang.String |
getStartedLogMessage() |
|
public Undertow |
getUndertow()Returns the Undertow. |
|
public void |
shutDownGracefully(GracefulShutdownCallback callback)Initiates a graceful shutdown of the Undertow web server. |
|
public void |
start() |
|
public void |
stop() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Create a new UndertowWebServer instance.
builder - the builderautoStart - if the server should be startedCreate a new UndertowWebServer instance.
builder - the builderhttpHandlerFactories - the handler factoriesautoStart - if the server should be started Returns the Undertow. Returns null until the server
has been started.
null if the server hasn't been started yet Initiates a graceful shutdown of the Undertow web server. Handling of new requests
is prevented and the given callback is invoked at the end of the attempt.
The attempt can be explicitly ended by invoking stop.
Once shutdown has been initiated Undertow will return an HTTP 503 response
for any new or existing connections.