Class TomcatSettings

java.lang.Object
org.apache.juneau.microservice.tomcat.TomcatSettings

public class TomcatSettings extends Object
Programmatic settings for the embedded Tomcat server contributed by TomcatConfiguration.

Users who need to override the defaults pulled from Config / ManifestFile should contribute a @Bean TomcatSettings from their own @Configuration class. Any value left null on this settings bean falls back to the corresponding Config / ManifestFile entry, then to a hard-coded default.

Example:

@Configuration public class MyAppConfig { @Bean public TomcatSettings tomcatSettings() { return TomcatSettings.create() .ports(8080, 0) .build(); } }

See Also:
Since:
10.0.0
  • Method Details

    • create

      public static TomcatSettings.Builder create()
      Creates a new builder for this object.
      Returns:
      A new builder.
    • getPorts

      public int[] getPorts()
      Returns the candidate ports to try when binding the Tomcat server, in priority order.
      Returns:
      The ports, or null if not set.
    • getBaseDir

      public String getBaseDir()
      Returns the Catalina base directory to use when building the Tomcat server.
      Returns:
      The base directory path, or null if not set (an auto-created temp directory is used).
    • getStopTimeout

      Returns the bounded graceful-shutdown drain timeout for the Tomcat server.
      Returns:
      The drain timeout, or null if not set.
    • getShutdownSettleDelay

      Returns the settle delay applied between flipping the readiness probe out of service and stopping the connector.
      Returns:
      The settle delay, or null if not set.