public class UndertowReactiveWebServerFactory extends AbstractReactiveWebServerFactory implements ConfigurableUndertowWebServerFactory
ReactiveWebServerFactory
that can be used to create UndertowWebServer
s.Constructor and Description |
---|
UndertowReactiveWebServerFactory()
Create a new
UndertowReactiveWebServerFactory instance. |
UndertowReactiveWebServerFactory(int port)
Create a new
UndertowReactiveWebServerFactory that listens for requests
using the specified port. |
Modifier and Type | Method and Description |
---|---|
void |
addBuilderCustomizers(UndertowBuilderCustomizer... customizers)
Add
UndertowBuilderCustomizer s that should be used to customize the
Undertow Builder . |
Collection<UndertowBuilderCustomizer> |
getBuilderCustomizers()
Returns a mutable collection of the
UndertowBuilderCustomizer s that will be
applied to the Undertow Builder . |
WebServer |
getWebServer(HttpHandler httpHandler)
Gets a new fully configured but paused
WebServer instance. |
boolean |
isAccessLogEnabled() |
protected boolean |
isUseForwardHeaders() |
void |
setAccessLogDirectory(File accessLogDirectory)
Set the access log directory.
|
void |
setAccessLogEnabled(boolean accessLogEnabled)
Set whether access logs are enabled.
|
void |
setAccessLogPattern(String accessLogPattern)
Set the access log pattern.
|
void |
setAccessLogPrefix(String accessLogPrefix)
Set the access log prefix.
|
void |
setAccessLogRotate(boolean accessLogRotate)
Set whether access logs rotation is enabled.
|
void |
setAccessLogSuffix(String accessLogSuffix)
Set the access log suffix.
|
void |
setBufferSize(Integer bufferSize)
Set the buffer size.
|
void |
setBuilderCustomizers(Collection<? extends UndertowBuilderCustomizer> customizers)
Set
UndertowBuilderCustomizer s that should be applied to the Undertow
Builder . |
void |
setIoThreads(Integer ioThreads)
Set the number of IO Threads.
|
void |
setUseDirectBuffers(Boolean directBuffers)
Set whether direct buffers should be used.
|
void |
setUseForwardHeaders(boolean useForwardHeaders)
Set if x-forward-* headers should be processed.
|
void |
setWorkerThreads(Integer workerThreads)
Set the number of Worker Threads.
|
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getHttp2, getPort, getServerHeader, getShutdown, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslStoreProvider
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslStoreProvider
addErrorPages
public UndertowReactiveWebServerFactory()
UndertowReactiveWebServerFactory
instance.public UndertowReactiveWebServerFactory(int port)
UndertowReactiveWebServerFactory
that listens for requests
using the specified port.port
- the port to listen onpublic WebServer getWebServer(HttpHandler httpHandler)
ReactiveWebServerFactory
WebServer
instance. Clients should
not be able to connect to the returned server until WebServer.start()
is
called (which happens when the ApplicationContext
has been fully
refreshed).getWebServer
in interface ReactiveWebServerFactory
httpHandler
- the HTTP handler in charge of processing requestsWebServer
WebServer.stop()
public void setAccessLogDirectory(File accessLogDirectory)
ConfigurableUndertowWebServerFactory
setAccessLogDirectory
in interface ConfigurableUndertowWebServerFactory
accessLogDirectory
- access log directorypublic void setAccessLogPattern(String accessLogPattern)
ConfigurableUndertowWebServerFactory
setAccessLogPattern
in interface ConfigurableUndertowWebServerFactory
accessLogPattern
- access log patternpublic void setAccessLogPrefix(String accessLogPrefix)
ConfigurableUndertowWebServerFactory
setAccessLogPrefix
in interface ConfigurableUndertowWebServerFactory
accessLogPrefix
- log prefixpublic void setAccessLogSuffix(String accessLogSuffix)
ConfigurableUndertowWebServerFactory
setAccessLogSuffix
in interface ConfigurableUndertowWebServerFactory
accessLogSuffix
- access log suffixpublic boolean isAccessLogEnabled()
public void setAccessLogEnabled(boolean accessLogEnabled)
ConfigurableUndertowWebServerFactory
setAccessLogEnabled
in interface ConfigurableUndertowWebServerFactory
accessLogEnabled
- whether access logs are enabledpublic void setAccessLogRotate(boolean accessLogRotate)
ConfigurableUndertowWebServerFactory
setAccessLogRotate
in interface ConfigurableUndertowWebServerFactory
accessLogRotate
- whether access logs rotation is enabledprotected final boolean isUseForwardHeaders()
public void setUseForwardHeaders(boolean useForwardHeaders)
ConfigurableUndertowWebServerFactory
setUseForwardHeaders
in interface ConfigurableUndertowWebServerFactory
useForwardHeaders
- if x-forward headers should be usedpublic void setBufferSize(Integer bufferSize)
ConfigurableUndertowWebServerFactory
setBufferSize
in interface ConfigurableUndertowWebServerFactory
bufferSize
- buffer sizepublic void setIoThreads(Integer ioThreads)
ConfigurableUndertowWebServerFactory
setIoThreads
in interface ConfigurableUndertowWebServerFactory
ioThreads
- number of IO Threadspublic void setWorkerThreads(Integer workerThreads)
ConfigurableUndertowWebServerFactory
setWorkerThreads
in interface ConfigurableUndertowWebServerFactory
workerThreads
- number of Worker Threadspublic void setUseDirectBuffers(Boolean directBuffers)
ConfigurableUndertowWebServerFactory
setUseDirectBuffers
in interface ConfigurableUndertowWebServerFactory
directBuffers
- whether direct buffers should be usedpublic void setBuilderCustomizers(Collection<? extends UndertowBuilderCustomizer> customizers)
UndertowBuilderCustomizer
s that should be applied to the Undertow
Builder
. Calling this method will replace any
existing customizers.customizers
- the customizers to setpublic Collection<UndertowBuilderCustomizer> getBuilderCustomizers()
UndertowBuilderCustomizer
s that will be
applied to the Undertow Builder
.public void addBuilderCustomizers(UndertowBuilderCustomizer... customizers)
UndertowBuilderCustomizer
s that should be used to customize the
Undertow Builder
.addBuilderCustomizers
in interface ConfigurableUndertowWebServerFactory
customizers
- the customizers to add