Class ServerConfiguration

java.lang.Object
io.github.rajendarreddyj.tomcat.config.ServerConfiguration

public final class ServerConfiguration extends Object
Immutable configuration for Tomcat server settings. Use the ServerConfiguration.Builder to construct instances.
Since:
1.0.0
Author:
rajendarreddyj
  • Method Details

    • getCatalinaHome

      public Path getCatalinaHome()
      Gets the Tomcat installation directory (CATALINA_HOME).
      Returns:
      the CATALINA_HOME path
    • getCatalinaBase

      public Path getCatalinaBase()
      Gets the Tomcat instance directory (CATALINA_BASE).
      Returns:
      the CATALINA_BASE path
    • getHttpHost

      public String getHttpHost()
      Gets the HTTP host to bind to.
      Returns:
      the HTTP host
    • getHttpPort

      public int getHttpPort()
      Gets the HTTP port.
      Returns:
      the HTTP port
    • getJavaHome

      public Path getJavaHome()
      Gets the Java home directory.
      Returns:
      the Java home path, or null to use system default
    • getVmOptions

      public List<String> getVmOptions()
      Gets the JVM options.
      Returns:
      an unmodifiable list of JVM options
    • getEnvironmentVariables

      public Map<String,String> getEnvironmentVariables()
      Gets the environment variables.
      Returns:
      an unmodifiable map of environment variables
    • getStartupTimeout

      public long getStartupTimeout()
      Gets the startup timeout in milliseconds.
      Returns:
      the startup timeout
    • getShutdownTimeout

      public long getShutdownTimeout()
      Gets the shutdown timeout in milliseconds.
      Returns:
      the shutdown timeout
    • getClasspathAdditions

      public List<String> getClasspathAdditions()
      Gets the additional classpath entries.
      Returns:
      an unmodifiable list of classpath additions
    • builder

      public static ServerConfiguration.Builder builder()
      Creates a new Builder instance.
      Returns:
      a new Builder
    • toString

      public String toString()
      Overrides:
      toString in class Object