public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFactory
ReactiveWebServerFactory that can be used to create a TomcatWebServer.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PROTOCOL
The class name of default protocol used.
|
| Constructor and Description |
|---|
TomcatReactiveWebServerFactory()
Create a new
TomcatServletWebServerFactory instance. |
TomcatReactiveWebServerFactory(int port)
Create a new
TomcatServletWebServerFactory that 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 Tomcat
Connector. |
void |
addContextCustomizers(TomcatContextCustomizer... tomcatContextCustomizers)
Add
TomcatContextCustomizers that should be added to the Tomcat
Context. |
protected void |
configureContext(Context context)
Configure the Tomcat
Context. |
protected void |
customizeConnector(Connector connector) |
Collection<TomcatConnectorCustomizer> |
getTomcatConnectorCustomizers()
Returns a mutable collection of the
TomcatConnectorCustomizers that will be
applied to the Tomcat Connector . |
Collection<TomcatContextCustomizer> |
getTomcatContextCustomizers()
Returns a mutable collection of the
TomcatContextCustomizers that will be
applied to the Tomcat Context . |
protected TomcatWebServer |
getTomcatWebServer(Tomcat tomcat)
Factory method called to create the
TomcatWebServer. |
WebServer |
getWebServer(HttpHandler httpHandler)
Gets a new fully configured but paused
WebServer instance. |
protected void |
prepareContext(Host host,
TomcatHttpHandlerAdapter servlet) |
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 Tomcat
Connector . |
void |
setTomcatContextCustomizers(Collection<? extends TomcatContextCustomizer> tomcatContextCustomizers)
Set
TomcatContextCustomizers that should be applied to the Tomcat
Context . |
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getPort, getServerHeader, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setPort, setServerHeader, setSsl, setSslStoreProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAddress, setCompression, setErrorPages, setPort, setServerHeader, setSsl, setSslStoreProvideraddErrorPagespublic static final String DEFAULT_PROTOCOL
public TomcatReactiveWebServerFactory()
TomcatServletWebServerFactory instance.public TomcatReactiveWebServerFactory(int port)
TomcatServletWebServerFactory 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).httpHandler - 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 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.tomcatContextCustomizers - 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.tomcatConnectorCustomizers - the customizers to addpublic Collection<TomcatConnectorCustomizer> getTomcatConnectorCustomizers()
TomcatConnectorCustomizers that will be
applied to the Tomcat Connector .protected 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.Connector(String)Copyright © 2017 Pivotal Software, Inc.. All rights reserved.