public class UndertowServletWebServer extends Object implements WebServer
WebServer
that can be used to control an embedded Undertow server. Typically
this class should be created using UndertowServletWebServerFactory
and not
directly.UndertowServletWebServerFactory
Constructor and Description |
---|
UndertowServletWebServer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
boolean useForwardHeaders,
boolean autoStart,
Compression compression)
Create a new
UndertowServletWebServer instance. |
UndertowServletWebServer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
boolean useForwardHeaders,
boolean autoStart,
Compression compression,
String serverHeader)
Create a new
UndertowServletWebServer instance. |
UndertowServletWebServer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
boolean autoStart,
Compression compression)
Create a new
UndertowServletWebServer instance. |
Modifier and Type | Method and Description |
---|---|
io.undertow.servlet.api.DeploymentManager |
getDeploymentManager() |
int |
getPort()
Return the port this server is listening on.
|
void |
start()
Starts the web server.
|
void |
stop()
Stops the web server.
|
public UndertowServletWebServer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, boolean autoStart, Compression compression)
UndertowServletWebServer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathautoStart
- if the server should be startedcompression
- compression configurationpublic UndertowServletWebServer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, boolean useForwardHeaders, boolean autoStart, Compression compression)
UndertowServletWebServer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathuseForwardHeaders
- if x-forward headers should be usedautoStart
- if the server should be startedcompression
- compression configurationpublic UndertowServletWebServer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, boolean useForwardHeaders, boolean autoStart, Compression compression, String serverHeader)
UndertowServletWebServer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathuseForwardHeaders
- if x-forward headers should be usedautoStart
- if the server should be startedcompression
- compression configurationserverHeader
- string to be used in HTTP headerpublic void start() throws WebServerException
WebServer
start
in interface WebServer
WebServerException
- if the server cannot be startedpublic io.undertow.servlet.api.DeploymentManager getDeploymentManager()
public void stop() throws WebServerException
WebServer
stop
in interface WebServer
WebServerException
- if the server cannot be stoppedCopyright © 2018 Pivotal Software, Inc.. All rights reserved.