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. |
UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
int port,
boolean useForwardHeaders,
boolean autoStart,
Compression compression)
Deprecated.
|
UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
int port,
boolean useForwardHeaders,
boolean autoStart,
Compression compression,
String serverHeader)
Deprecated.
|
UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder,
io.undertow.servlet.api.DeploymentManager manager,
String contextPath,
int port,
boolean autoStart,
Compression compression)
Deprecated.
|
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.
|
@Deprecated public UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, int port, boolean autoStart, Compression compression)
UndertowEmbeddedServletContainer(Undertow.Builder, DeploymentManager, String, boolean, Compression)
UndertowEmbeddedServletContainer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathport
- the port to listen on (not used)autoStart
- if the server should be startedcompression
- compression configuration@Deprecated public UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, int port, boolean useForwardHeaders, boolean autoStart, Compression compression)
UndertowEmbeddedServletContainer(Undertow.Builder, DeploymentManager, String, boolean, boolean, Compression)
UndertowEmbeddedServletContainer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathport
- the port to listen on (not used)useForwardHeaders
- if x-forward headers should be usedautoStart
- if the server should be startedcompression
- compression configuration@Deprecated public UndertowEmbeddedServletContainer(io.undertow.Undertow.Builder builder, io.undertow.servlet.api.DeploymentManager manager, String contextPath, int port, boolean useForwardHeaders, boolean autoStart, Compression compression, String serverHeader)
UndertowEmbeddedServletContainer(Undertow.Builder, DeploymentManager, String, boolean, boolean, Compression, String)
UndertowEmbeddedServletContainer
instance.builder
- the buildermanager
- the deployment managercontextPath
- the root context pathport
- the port to listen on (not used)useForwardHeaders
- if x-forward headers should be usedautoStart
- if the server should be startedcompression
- compression configurationserverHeader
- string to be used in HTTP headerpublic 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 © 2017 Pivotal Software, Inc.. All rights reserved.