Class ServletServerFactory

java.lang.Object
io.micronaut.http.ssl.SslBuilder<SSLContext>
io.micronaut.servlet.engine.server.ServletServerFactory
Direct Known Subclasses:
JettyFactory, TomcatFactory, UndertowFactory

public abstract class ServletServerFactory extends io.micronaut.http.ssl.SslBuilder<SSLContext>
Parent factory class for servlet-based servers.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • ServletServerFactory

      protected ServletServerFactory(io.micronaut.core.io.ResourceResolver resourceResolver, io.micronaut.http.server.HttpServerConfiguration serverConfiguration, io.micronaut.http.ssl.SslConfiguration sslConfiguration, io.micronaut.context.ApplicationContext applicationContext, List<ServletStaticResourceConfiguration> staticResourceConfigurations)
      Default constructor.
      Parameters:
      resourceResolver - The resource resolver.
      serverConfiguration - The server configuration
      sslConfiguration - The SSL configuration
      applicationContext - The app context
      staticResourceConfigurations - The static resource definitions
  • Method Details

    • getStaticResourceConfigurations

      public List<ServletStaticResourceConfiguration> getStaticResourceConfigurations()
      Returns:
      The static resource configurations.
    • getEnvironment

      public io.micronaut.context.env.Environment getEnvironment()
      Returns:
      The environment
    • getApplicationContext

      public io.micronaut.context.ApplicationContext getApplicationContext()
      Returns:
      The app context
    • getContextPath

      protected String getContextPath()
      Returns:
      The context path.
    • getServerConfiguration

      public io.micronaut.http.server.HttpServerConfiguration getServerConfiguration()
      Returns:
      The server config
    • getSslConfiguration

      public io.micronaut.http.ssl.SslConfiguration getSslConfiguration()
      Returns:
      The SSL config
    • build

      public Optional<SSLContext> build(io.micronaut.http.ssl.SslConfiguration ssl)
      Specified by:
      build in class io.micronaut.http.ssl.SslBuilder<SSLContext>
    • build

      public Optional<SSLContext> build(io.micronaut.http.ssl.SslConfiguration ssl, io.micronaut.http.HttpVersion httpVersion)
      Specified by:
      build in class io.micronaut.http.ssl.SslBuilder<SSLContext>
    • getConfiguredHost

      protected String getConfiguredHost()
      Returns:
      The configured host.
    • getConfiguredPort

      protected Integer getConfiguredPort()
      Returns:
      The configured port.