Class TomcatLauncher
java.lang.Object
io.github.rajendarreddyj.tomcat.lifecycle.TomcatLauncher
Manages Tomcat process lifecycle.
- Since:
- 1.0.0
- Author:
- rajendarreddyj
-
Constructor Summary
ConstructorsConstructorDescriptionTomcatLauncher(ServerConfiguration config, Log log) Creates a new TomcatLauncher with the given configuration. -
Method Summary
-
Constructor Details
-
TomcatLauncher
Creates a new TomcatLauncher with the given configuration.- Parameters:
config- the server configurationlog- the Maven logger
-
-
Method Details
-
run
Starts Tomcat in foreground mode (blocks until shutdown).- Throws:
IOException- if process cannot be startedInterruptedException- if wait is interrupted
-
start
Starts Tomcat in background mode.- Throws:
IOException- if process cannot be started or startup fails
-
stop
Stops running Tomcat instance.- Throws:
IOException- if stop failsInterruptedException- if wait is interrupted
-
getProcess
Gets the underlying Tomcat process.- Returns:
- the Tomcat process, or null if not started
-