Interface ConfigurableJettyWebServerFactory
- All Superinterfaces:
ConfigurableWebServerFactory, ErrorPageRegistry, WebServerFactory
- All Known Implementing Classes:
JettyReactiveWebServerFactory, JettyServletWebServerFactory, JettyWebServerFactory
ConfigurableWebServerFactory for Jetty-specific features.- Since:
- 4.0.0
- Author:
- Brian Clozel, Moritz Halbritter
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddServerCustomizers(JettyServerCustomizer... customizers) AddJettyServerCustomizers that will be applied to theServerbefore it is started.voidsetAcceptors(int acceptors) Set the number of acceptor threads to use.voidsetMaxConnections(int maxConnections) Sets the maximum number of concurrent connections.voidsetSelectors(int selectors) Set the number of selector threads to use.voidsetThreadPool(@Nullable org.eclipse.jetty.util.thread.ThreadPool threadPool) Set theThreadPoolthat should be used by theServer.voidsetUseForwardHeaders(boolean useForwardHeaders) Set if x-forward-* headers should be processed.Methods inherited from interface ConfigurableWebServerFactory
setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslBundlesMethods inherited from interface ErrorPageRegistry
addErrorPages
-
Method Details
-
setAcceptors
void setAcceptors(int acceptors) Set the number of acceptor threads to use.- Parameters:
acceptors- the number of acceptor threads to use
-
setThreadPool
void setThreadPool(@Nullable org.eclipse.jetty.util.thread.ThreadPool threadPool) Set theThreadPoolthat should be used by theServer. If set tonull(default), theServercreates aThreadPoolimplicitly.- Parameters:
threadPool- the ThreadPool to be used
-
setSelectors
void setSelectors(int selectors) Set the number of selector threads to use.- Parameters:
selectors- the number of selector threads to use
-
setUseForwardHeaders
void setUseForwardHeaders(boolean useForwardHeaders) Set if x-forward-* headers should be processed.- Parameters:
useForwardHeaders- if x-forward headers should be used
-
addServerCustomizers
AddJettyServerCustomizers that will be applied to theServerbefore it is started.- Parameters:
customizers- the customizers to add
-
setMaxConnections
void setMaxConnections(int maxConnections) Sets the maximum number of concurrent connections.- Parameters:
maxConnections- the maximum number of concurrent connections
-