Class ServerConfiguration
java.lang.Object
io.github.rajendarreddyj.tomcat.config.ServerConfiguration
Immutable configuration for Tomcat server settings.
Use the
ServerConfiguration.Builder to construct instances.- Since:
- 1.0.0
- Author:
- rajendarreddyj
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for ServerConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerConfiguration.Builderbuilder()Creates a new Builder instance.Gets the Tomcat instance directory (CATALINA_BASE).Gets the Tomcat installation directory (CATALINA_HOME).Gets the additional classpath entries.Gets the environment variables.Gets the HTTP host to bind to.intGets the HTTP port.Gets the Java home directory.longGets the shutdown timeout in milliseconds.longGets the startup timeout in milliseconds.Gets the JVM options.toString()
-
Method Details
-
getCatalinaHome
Gets the Tomcat installation directory (CATALINA_HOME).- Returns:
- the CATALINA_HOME path
-
getCatalinaBase
Gets the Tomcat instance directory (CATALINA_BASE).- Returns:
- the CATALINA_BASE path
-
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
Gets the Java home directory.- Returns:
- the Java home path, or null to use system default
-
getVmOptions
Gets the JVM options.- Returns:
- an unmodifiable list of JVM options
-
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
Gets the additional classpath entries.- Returns:
- an unmodifiable list of classpath additions
-
builder
Creates a new Builder instance.- Returns:
- a new Builder
-
toString
-