Package io.micronaut.servlet.tomcat
Class TomcatFactory
java.lang.Object
io.micronaut.http.ssl.SslBuilder<SSLContext>
io.micronaut.servlet.engine.server.ServletServerFactory
io.micronaut.servlet.tomcat.TomcatFactory
Factory for the
Tomcat
instance.- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
ModifierConstructorDescriptionprotected
TomcatFactory
(io.micronaut.core.io.ResourceResolver resourceResolver, TomcatConfiguration serverConfiguration, io.micronaut.http.ssl.SslConfiguration sslConfiguration, io.micronaut.context.ApplicationContext applicationContext, List<ServletStaticResourceConfiguration> staticResourceConfigurations) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.catalina.connector.Connector
protected org.apache.catalina.startup.Tomcat
tomcatServer
(org.apache.catalina.connector.Connector connector, MicronautServletConfiguration configuration) The Tomcat server bean.Methods inherited from class io.micronaut.servlet.engine.server.ServletServerFactory
build, build, getApplicationContext, getConfiguredHost, getConfiguredPort, getContextPath, getEnvironment, getSslConfiguration, getStaticResourceConfigurations
Methods inherited from class io.micronaut.http.ssl.SslBuilder
getKeyManagerFactory, getKeyStore, getTrustManagerFactory, getTrustStore, load
-
Constructor Details
-
TomcatFactory
protected TomcatFactory(io.micronaut.core.io.ResourceResolver resourceResolver, TomcatConfiguration serverConfiguration, io.micronaut.http.ssl.SslConfiguration sslConfiguration, io.micronaut.context.ApplicationContext applicationContext, List<ServletStaticResourceConfiguration> staticResourceConfigurations) Default constructor.- Parameters:
resourceResolver
- The resource resolverserverConfiguration
- The server configsslConfiguration
- The SSL configapplicationContext
- The app contextstaticResourceConfigurations
- The static resource configs
-
-
Method Details
-
getServerConfiguration
- Overrides:
getServerConfiguration
in classServletServerFactory
- Returns:
- The server config
-
tomcatServer
@Singleton @Primary protected org.apache.catalina.startup.Tomcat tomcatServer(org.apache.catalina.connector.Connector connector, MicronautServletConfiguration configuration) The Tomcat server bean.- Parameters:
connector
- The connectorconfiguration
- The servlet configuration- Returns:
- The Tomcat server
-
tomcatConnector
@Singleton @Primary protected org.apache.catalina.connector.Connector tomcatConnector()- Returns:
- Create the protocol.
-