Class UndertowReactiveWebServerFactory
java.lang.Object
org.springframework.boot.web.server.AbstractConfigurableWebServerFactory
org.springframework.boot.web.reactive.server.AbstractReactiveWebServerFactory
org.springframework.boot.web.embedded.undertow.UndertowReactiveWebServerFactory
- All Implemented Interfaces:
ConfigurableUndertowWebServerFactory
,ConfigurableReactiveWebServerFactory
,ReactiveWebServerFactory
,ConfigurableWebServerFactory
,ErrorPageRegistry
,WebServerFactory
public class UndertowReactiveWebServerFactory
extends AbstractReactiveWebServerFactory
implements ConfigurableUndertowWebServerFactory
ReactiveWebServerFactory
that can be used to create UndertowWebServer
s.- Since:
- 2.0.0
-
Constructor Summary
ConstructorDescriptionCreate a newUndertowReactiveWebServerFactory
instance.UndertowReactiveWebServerFactory
(int port) Create a newUndertowReactiveWebServerFactory
that listens for requests using the specified port. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBuilderCustomizers
(UndertowBuilderCustomizer... customizers) AddUndertowBuilderCustomizer
s that should be used to customize the UndertowUndertow.Builder
.Returns a mutable collection of theUndertowBuilderCustomizer
s that will be applied to the UndertowBuilder
.getWebServer
(org.springframework.http.server.reactive.HttpHandler httpHandler) Gets a new fully configured but pausedWebServer
instance.boolean
protected final boolean
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) SetUndertowBuilderCustomizer
s that should be applied to the UndertowUndertow.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.Methods inherited from class org.springframework.boot.web.server.AbstractConfigurableWebServerFactory
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getHttp2, getOrCreateSslStoreProvider, getPort, getServerHeader, getShutdown, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslStoreProvider
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.web.server.ConfigurableWebServerFactory
setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslStoreProvider
Methods inherited from interface org.springframework.boot.web.server.ErrorPageRegistry
addErrorPages
-
Constructor Details
-
UndertowReactiveWebServerFactory
public UndertowReactiveWebServerFactory()Create a newUndertowReactiveWebServerFactory
instance. -
UndertowReactiveWebServerFactory
public UndertowReactiveWebServerFactory(int port) Create a newUndertowReactiveWebServerFactory
that listens for requests using the specified port.- Parameters:
port
- the port to listen on
-
-
Method Details
-
setBuilderCustomizers
Description copied from interface:ConfigurableUndertowWebServerFactory
SetUndertowBuilderCustomizer
s that should be applied to the UndertowUndertow.Builder
. Calling this method will replace any existing customizers.- Specified by:
setBuilderCustomizers
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
customizers
- the customizers to set
-
addBuilderCustomizers
Description copied from interface:ConfigurableUndertowWebServerFactory
AddUndertowBuilderCustomizer
s that should be used to customize the UndertowUndertow.Builder
.- Specified by:
addBuilderCustomizers
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
customizers
- the customizers to add
-
getBuilderCustomizers
Returns a mutable collection of theUndertowBuilderCustomizer
s that will be applied to the UndertowBuilder
.- Returns:
- the customizers that will be applied
-
setBufferSize
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the buffer size.- Specified by:
setBufferSize
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
bufferSize
- buffer size
-
setIoThreads
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the number of IO Threads.- Specified by:
setIoThreads
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
ioThreads
- number of IO Threads
-
setWorkerThreads
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the number of Worker Threads.- Specified by:
setWorkerThreads
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
workerThreads
- number of Worker Threads
-
setUseDirectBuffers
Description copied from interface:ConfigurableUndertowWebServerFactory
Set whether direct buffers should be used.- Specified by:
setUseDirectBuffers
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
directBuffers
- whether direct buffers should be used
-
setUseForwardHeaders
public void setUseForwardHeaders(boolean useForwardHeaders) Description copied from interface:ConfigurableUndertowWebServerFactory
Set if x-forward-* headers should be processed.- Specified by:
setUseForwardHeaders
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
useForwardHeaders
- if x-forward headers should be used
-
isUseForwardHeaders
protected final boolean isUseForwardHeaders() -
setAccessLogDirectory
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the access log directory.- Specified by:
setAccessLogDirectory
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
accessLogDirectory
- access log directory
-
setAccessLogPattern
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the access log pattern.- Specified by:
setAccessLogPattern
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
accessLogPattern
- access log pattern
-
setAccessLogPrefix
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the access log prefix.- Specified by:
setAccessLogPrefix
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
accessLogPrefix
- log prefix
-
setAccessLogSuffix
Description copied from interface:ConfigurableUndertowWebServerFactory
Set the access log suffix.- Specified by:
setAccessLogSuffix
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
accessLogSuffix
- access log suffix
-
isAccessLogEnabled
public boolean isAccessLogEnabled() -
setAccessLogEnabled
public void setAccessLogEnabled(boolean accessLogEnabled) Description copied from interface:ConfigurableUndertowWebServerFactory
Set whether access logs are enabled.- Specified by:
setAccessLogEnabled
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
accessLogEnabled
- whether access logs are enabled
-
setAccessLogRotate
public void setAccessLogRotate(boolean accessLogRotate) Description copied from interface:ConfigurableUndertowWebServerFactory
Set whether access logs rotation is enabled.- Specified by:
setAccessLogRotate
in interfaceConfigurableUndertowWebServerFactory
- Parameters:
accessLogRotate
- whether access logs rotation is enabled
-
getWebServer
Description copied from interface:ReactiveWebServerFactory
Gets a new fully configured but pausedWebServer
instance. Clients should not be able to connect to the returned server untilWebServer.start()
is called (which happens when theApplicationContext
has been fully refreshed).- Specified by:
getWebServer
in interfaceReactiveWebServerFactory
- Parameters:
httpHandler
- the HTTP handler in charge of processing requests- Returns:
- a fully configured and started
WebServer
- See Also:
-