public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFactory implements ConfigurableTomcatWebServerFactory
ReactiveWebServerFactory that can be used to create a TomcatWebServer.| Modifier and Type | Field and Description | 
|---|---|
| static String | DEFAULT_PROTOCOLThe class name of default protocol used. | 
| Constructor and Description | 
|---|
| TomcatReactiveWebServerFactory()Create a new  TomcatReactiveWebServerFactoryinstance. | 
| TomcatReactiveWebServerFactory(int port)Create a new  TomcatReactiveWebServerFactorythat listens for requests using
 the specified port. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAdditionalTomcatConnectors(Connector... connectors)Add  Connectors in addition to the default connector, e.g. | 
| void | addConnectorCustomizers(TomcatConnectorCustomizer... tomcatConnectorCustomizers)Add  TomcatConnectorCustomizers that should be added to the TomcatConnector. | 
| void | addContextCustomizers(TomcatContextCustomizer... tomcatContextCustomizers)Add  TomcatContextCustomizers that should be added to the TomcatContext. | 
| void | addContextLifecycleListeners(LifecycleListener... contextLifecycleListeners)Add  LifecycleListeners that should be added to the TomcatContext. | 
| void | addEngineValves(Valve... engineValves) | 
| void | addProtocolHandlerCustomizers(TomcatProtocolHandlerCustomizer<?>... tomcatProtocolHandlerCustomizers)Add  TomcatProtocolHandlerCustomizers that should be added to the TomcatConnector. | 
| protected void | configureContext(Context context)Configure the Tomcat  Context. | 
| protected void | customizeConnector(Connector connector) | 
| List<Connector> | getAdditionalTomcatConnectors()Returns a mutable collection of the  Connectors that will be added to the
 Tomcat. | 
| Collection<LifecycleListener> | getContextLifecycleListeners()Returns a mutable collection of the  LifecycleListeners that will be applied
 to the TomcatContext. | 
| List<Valve> | getEngineValves() | 
| Collection<TomcatConnectorCustomizer> | getTomcatConnectorCustomizers()Returns a mutable collection of the  TomcatConnectorCustomizers that will be
 applied to the TomcatConnector. | 
| Collection<TomcatContextCustomizer> | getTomcatContextCustomizers()Returns a mutable collection of the  TomcatContextCustomizers that will be
 applied to the TomcatContext. | 
| Collection<TomcatProtocolHandlerCustomizer<?>> | getTomcatProtocolHandlerCustomizers()Returns a mutable collection of the  TomcatProtocolHandlerCustomizers that
 will be applied to the TomcatConnector. | 
| protected TomcatWebServer | getTomcatWebServer(Tomcat tomcat)Factory method called to create the  TomcatWebServer. | 
| Charset | getUriEncoding()Returns the character encoding to use for URL decoding. | 
| WebServer | getWebServer(HttpHandler httpHandler)Gets a new fully configured but paused  WebServerinstance. | 
| protected void | prepareContext(Host host,
              TomcatHttpHandlerAdapter servlet) | 
| void | setBackgroundProcessorDelay(int delay)Sets the background processor delay in seconds. | 
| void | setBaseDirectory(File baseDirectory)Set the Tomcat base directory. | 
| void | setContextLifecycleListeners(Collection<? extends LifecycleListener> contextLifecycleListeners)Set  LifecycleListeners that should be applied to the TomcatContext. | 
| void | setDisableMBeanRegistry(boolean disableMBeanRegistry)Set whether the factory should disable Tomcat's MBean registry prior to creating
 the server. | 
| void | setProtocol(String protocol)The Tomcat protocol to use when create the  Connector. | 
| void | setTomcatConnectorCustomizers(Collection<? extends TomcatConnectorCustomizer> tomcatConnectorCustomizers)Set  TomcatConnectorCustomizers that should be applied to the TomcatConnector. | 
| void | setTomcatContextCustomizers(Collection<? extends TomcatContextCustomizer> tomcatContextCustomizers)Set  TomcatContextCustomizers that should be applied to the TomcatContext. | 
| void | setTomcatProtocolHandlerCustomizers(Collection<? extends TomcatProtocolHandlerCustomizer<?>> tomcatProtocolHandlerCustomizers)Set  TomcatProtocolHandlerCustomizers that should be applied to the TomcatConnector. | 
| void | setUriEncoding(Charset uriEncoding)Set the character encoding to use for URL decoding. | 
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getHttp2, getPort, getServerHeader, getShutdown, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslStoreProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslStoreProvideraddErrorPagespublic static final String DEFAULT_PROTOCOL
public TomcatReactiveWebServerFactory()
TomcatReactiveWebServerFactory instance.public TomcatReactiveWebServerFactory(int port)
TomcatReactiveWebServerFactory that listens for requests using
 the specified port.port - the port to listen onpublic WebServer getWebServer(HttpHandler httpHandler)
ReactiveWebServerFactoryWebServer 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 ReactiveWebServerFactoryhttpHandler - the HTTP handler in charge of processing requestsWebServerWebServer.stop()protected void prepareContext(Host host, TomcatHttpHandlerAdapter servlet)
protected void configureContext(Context context)
Context.context - the Tomcat contextprotected void customizeConnector(Connector connector)
public void setBaseDirectory(File baseDirectory)
ConfigurableTomcatWebServerFactorysetBaseDirectory in interface ConfigurableTomcatWebServerFactorybaseDirectory - the tomcat base directorypublic void setBackgroundProcessorDelay(int delay)
ConfigurableTomcatWebServerFactorysetBackgroundProcessorDelay in interface ConfigurableTomcatWebServerFactorydelay - the delay in secondspublic void setTomcatContextCustomizers(Collection<? extends TomcatContextCustomizer> tomcatContextCustomizers)
TomcatContextCustomizers that should be applied to the Tomcat
 Context. Calling this method will replace any existing customizers.tomcatContextCustomizers - the customizers to setpublic Collection<TomcatContextCustomizer> getTomcatContextCustomizers()
TomcatContextCustomizers that will be
 applied to the Tomcat Context.public void addContextCustomizers(TomcatContextCustomizer... tomcatContextCustomizers)
TomcatContextCustomizers that should be added to the Tomcat
 Context.addContextCustomizers in interface ConfigurableTomcatWebServerFactorytomcatContextCustomizers - the customizers to addpublic void setTomcatConnectorCustomizers(Collection<? extends TomcatConnectorCustomizer> tomcatConnectorCustomizers)
TomcatConnectorCustomizers that should be applied to the Tomcat
 Connector. Calling this method will replace any existing customizers.tomcatConnectorCustomizers - the customizers to setpublic void addConnectorCustomizers(TomcatConnectorCustomizer... tomcatConnectorCustomizers)
TomcatConnectorCustomizers that should be added to the Tomcat
 Connector.addConnectorCustomizers in interface ConfigurableTomcatWebServerFactorytomcatConnectorCustomizers - the customizers to addpublic Collection<TomcatConnectorCustomizer> getTomcatConnectorCustomizers()
TomcatConnectorCustomizers that will be
 applied to the Tomcat Connector.public void setTomcatProtocolHandlerCustomizers(Collection<? extends TomcatProtocolHandlerCustomizer<?>> tomcatProtocolHandlerCustomizers)
TomcatProtocolHandlerCustomizers that should be applied to the Tomcat
 Connector. Calling this method will replace any existing customizers.tomcatProtocolHandlerCustomizers - the customizers to setpublic void addProtocolHandlerCustomizers(TomcatProtocolHandlerCustomizer<?>... tomcatProtocolHandlerCustomizers)
TomcatProtocolHandlerCustomizers that should be added to the Tomcat
 Connector.addProtocolHandlerCustomizers in interface ConfigurableTomcatWebServerFactorytomcatProtocolHandlerCustomizers - the customizers to addpublic Collection<TomcatProtocolHandlerCustomizer<?>> getTomcatProtocolHandlerCustomizers()
TomcatProtocolHandlerCustomizers that
 will be applied to the Tomcat Connector.public void addAdditionalTomcatConnectors(Connector... connectors)
Connectors in addition to the default connector, e.g. for SSL or AJPconnectors - the connectors to addpublic List<Connector> getAdditionalTomcatConnectors()
Connectors that will be added to the
 Tomcat.public void addEngineValves(Valve... engineValves)
ConfigurableTomcatWebServerFactoryaddEngineValves in interface ConfigurableTomcatWebServerFactoryengineValves - the valves to addpublic List<Valve> getEngineValves()
public void setUriEncoding(Charset uriEncoding)
setUriEncoding in interface ConfigurableTomcatWebServerFactoryuriEncoding - the uri encoding to setpublic Charset getUriEncoding()
public void setContextLifecycleListeners(Collection<? extends LifecycleListener> contextLifecycleListeners)
LifecycleListeners that should be applied to the Tomcat
 Context. Calling this method will replace any existing listeners.contextLifecycleListeners - the listeners to setpublic Collection<LifecycleListener> getContextLifecycleListeners()
LifecycleListeners that will be applied
 to the Tomcat Context.public void addContextLifecycleListeners(LifecycleListener... contextLifecycleListeners)
LifecycleListeners that should be added to the Tomcat Context.contextLifecycleListeners - the listeners to addprotected TomcatWebServer getTomcatWebServer(Tomcat tomcat)
TomcatWebServer. Subclasses can
 override this method to return a different TomcatWebServer or apply
 additional processing to the Tomcat server.tomcat - the Tomcat server.TomcatWebServer instancepublic void setProtocol(String protocol)
Connector.protocol - the protocolConnector(String)public void setDisableMBeanRegistry(boolean disableMBeanRegistry)
disableMBeanRegistry - whether to disable the MBean registry