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 | 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(org.apache.catalina.LifecycleListener... contextLifecycleListeners)Add  LifecycleListeners that should be added to the TomcatContext. | 
| void | addEngineValves(org.apache.catalina.Valve... engineValves)Add  Valves that should be applied to the TomcatEngine. | 
| protected void | configureContext(org.apache.catalina.Context context)Configure the Tomcat  Context. | 
| protected void | customizeConnector(org.apache.catalina.connector.Connector connector) | 
| Collection<org.apache.catalina.LifecycleListener> | getContextLifecycleListeners()Returns a mutable collection of the  LifecycleListeners that will be applied
 to the TomcatContext. | 
| List<org.apache.catalina.Valve> | getEngineValves()Returns a mutable collection of the  Valves that will be applied to the
 TomcatEngine. | 
| 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. | 
| protected TomcatWebServer | getTomcatWebServer(org.apache.catalina.startup.Tomcat tomcat)Factory method called to create the  TomcatWebServer. | 
| Charset | getUriEncoding()Returns the character encoding to use for URL decoding. | 
| WebServer | getWebServer(org.springframework.http.server.reactive.HttpHandler httpHandler)Gets a new fully configured but paused  WebServerinstance. | 
| protected void | prepareContext(org.apache.catalina.Host host,
              org.springframework.http.server.reactive.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 org.apache.catalina.LifecycleListener> contextLifecycleListeners)Set  LifecycleListeners that should be applied to the TomcatContext. | 
| 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 | setUriEncoding(Charset uriEncoding)Set the character encoding to use for URL decoding. | 
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getHttp2, getPort, getServerHeader, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setSsl, setSslStoreProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, 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(org.springframework.http.server.reactive.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(org.apache.catalina.Host host,
                              org.springframework.http.server.reactive.TomcatHttpHandlerAdapter servlet)
protected void configureContext(org.apache.catalina.Context context)
Context.context - the Tomcat contextprotected void customizeConnector(org.apache.catalina.connector.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 addEngineValves(org.apache.catalina.Valve... engineValves)
ConfigurableTomcatWebServerFactoryValves that should be applied to the Tomcat Engine.addEngineValves in interface ConfigurableTomcatWebServerFactoryengineValves - the valves to addpublic List<org.apache.catalina.Valve> getEngineValves()
Valves that will be applied to the
 Tomcat Engine.public void setUriEncoding(Charset uriEncoding)
setUriEncoding in interface ConfigurableTomcatWebServerFactoryuriEncoding - the uri encoding to setpublic Charset getUriEncoding()
public void setContextLifecycleListeners(Collection<? extends org.apache.catalina.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<org.apache.catalina.LifecycleListener> getContextLifecycleListeners()
LifecycleListeners that will be applied
 to the Tomcat Context.public void addContextLifecycleListeners(org.apache.catalina.LifecycleListener... contextLifecycleListeners)
LifecycleListeners that should be added to the Tomcat Context.contextLifecycleListeners - the listeners to addprotected TomcatWebServer getTomcatWebServer(org.apache.catalina.startup.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)Copyright © 2020 Pivotal Software, Inc.. All rights reserved.