public class UndertowEmbeddedServletContainer extends Object implements EmbeddedServletContainer
EmbeddedServletContainer
that can be used to control an embedded Undertow
server. Typically this class should be created using
UndertowEmbeddedServletContainerFactory
and not directly.UndertowEmbeddedServletContainerFactory
Constructor and Description |
---|
UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
boolean useForwardHeaders,
boolean autoStart,
Compression compression)
Create a new
UndertowEmbeddedServletContainer instance. |
UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
boolean useForwardHeaders,
boolean autoStart,
Compression compression,
String serverHeader)
Create a new
UndertowEmbeddedServletContainer instance. |
UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
boolean autoStart,
Compression compression)
Create a new
UndertowEmbeddedServletContainer instance. |
Modifier and Type | Method and Description |
---|---|
int |
getPort()
Return the port this server is listening on.
|
void |
start()
Starts the embedded servlet container.
|
void |
stop()
Stops the embedded servlet container.
|
public UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, boolean autoStart, Compression compression)
UndertowEmbeddedServletContainer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathautoStart
- if the server should be startedcompression
- compression configurationpublic UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, boolean useForwardHeaders, boolean autoStart, Compression compression)
UndertowEmbeddedServletContainer
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 UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, boolean useForwardHeaders, boolean autoStart, Compression compression, String serverHeader)
UndertowEmbeddedServletContainer
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 EmbeddedServletContainerException
EmbeddedServletContainer
start
in interface EmbeddedServletContainer
EmbeddedServletContainerException
- if the container cannot be startedpublic void stop() throws EmbeddedServletContainerException
EmbeddedServletContainer
stop
in interface EmbeddedServletContainer
EmbeddedServletContainerException
- if the container cannot be stoppedpublic int getPort()
EmbeddedServletContainer
getPort
in interface EmbeddedServletContainer
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.