Class TomcatConfiguration

java.lang.Object
io.micronaut.http.server.HttpServerConfiguration
io.micronaut.servlet.tomcat.TomcatConfiguration
All Implemented Interfaces:
io.micronaut.http.context.ServerContextPathProvider

@ConfigurationProperties("tomcat") @Replaces(io.micronaut.http.server.HttpServerConfiguration.class) public class TomcatConfiguration extends io.micronaut.http.server.HttpServerConfiguration
Extends HttpServerConfiguration and allows configuring Tomcat.
Since:
1.0
Author:
graemerocher
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.micronaut.http.server.HttpServerConfiguration

    io.micronaut.http.server.HttpServerConfiguration.CorsConfiguration, io.micronaut.http.server.HttpServerConfiguration.HostResolutionConfiguration, io.micronaut.http.server.HttpServerConfiguration.HttpLocaleResolutionConfigurationProperties, io.micronaut.http.server.HttpServerConfiguration.MultipartConfiguration
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.apache.catalina.connector.Connector
     

    Fields inherited from class io.micronaut.http.server.HttpServerConfiguration

    DEFAULT_DATEHEADER, DEFAULT_DISPATCH_OPTIONS_REQUESTS, DEFAULT_DUAL_PROTOCOL, DEFAULT_HTTP_TO_HTTPS_REDIRECT, DEFAULT_IDLE_TIME_MINUTES, DEFAULT_LOG_HANDLED_EXCEPTIONS, DEFAULT_MAX_REQUEST_SIZE, DEFAULT_PORT, DEFAULT_RANDOM_PORT, DEFAULT_READ_IDLE_TIME_MINUTES, DEFAULT_WRITE_IDLE_TIME_MINUTES, PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    TomcatConfiguration(@Nullable io.micronaut.http.server.HttpServerConfiguration.MultipartConfiguration multipartConfiguration, @Nullable String protocol)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<io.micronaut.http.server.HttpServerConfiguration.MultipartConfiguration>
     
     
    org.apache.catalina.connector.Connector
     
    void
    setProtocol(@Nullable String protocol)
     

    Methods inherited from class io.micronaut.http.server.HttpServerConfiguration

    getApplicationConfiguration, getClientAddressHeader, getContextPath, getCors, getDefaultCharset, getHost, getHostResolution, getHttpVersion, getIdleTimeout, getLocaleResolution, getMaxRequestSize, getMultipart, getPort, getReadIdleTimeout, getReadTimeout, getServerHeader, getThreadSelection, getWriteIdleTimeout, isDateHeader, isDispatchOptionsRequests, isDualProtocol, isHttpToHttpsRedirect, isLogHandledExceptions, isValidateUrl, setClientAddressHeader, setContextPath, setCors, setDateHeader, setDefaultCharset, setDispatchOptionsRequests, setDualProtocol, setHost, setHostResolution, setHttpToHttpsRedirect, setHttpVersion, setIdleTimeout, setLocaleResolution, setLogHandledExceptions, setMaxRequestSize, setMultipart, setPort, setReadIdleTimeout, setReadTimeout, setServerHeader, setThreadSelection, setValidateUrl, setWriteIdleTimeout

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • tomcatConnector

      @ConfigurationBuilder protected final org.apache.catalina.connector.Connector tomcatConnector
  • Constructor Details

    • TomcatConfiguration

      public TomcatConfiguration(@Nullable @Nullable io.micronaut.http.server.HttpServerConfiguration.MultipartConfiguration multipartConfiguration, @Property(name="micronaut.server.tomcat.protocol") @Nullable @Nullable String protocol)
      Default constructor.
      Parameters:
      multipartConfiguration - The multipart config
      protocol - The protocol to use
  • Method Details

    • getProtocol

      public String getProtocol()
      Returns:
      The protocol to use. Defaults to org.apache.coyote.http11.Http11NioProtocol.
    • setProtocol

      public void setProtocol(@Nullable @Nullable String protocol)
      Parameters:
      protocol - The protocol to use. Defaults to org.apache.coyote.http11.Http11NioProtocol.
    • getTomcatConnector

      public org.apache.catalina.connector.Connector getTomcatConnector()
      Returns:
      The tomcat connector.
    • getMultipartConfiguration

      public Optional<io.micronaut.http.server.HttpServerConfiguration.MultipartConfiguration> getMultipartConfiguration()
      Returns:
      The multipart configuration