Interface ScriptRunner
- All Known Implementing Classes:
ScriptRunnerUnix
public interface ScriptRunner
Runs external scripts.
-
Method Summary
Modifier and TypeMethodDescriptionintRuns a script.startScript(String scriptName, String... arguments) Starts a script.voidstopScript(LoggingProcess loggingProcess) Stops a script
-
Method Details
-
runScript
Runs a script. This method waits for the script to terminate.- Parameters:
scriptName- name of the script- Returns:
- return value of the script. Usually, a zero exit value indicates success, while non-zero values indicate failure.
- Throws:
IOExceptionInterruptedException
-
startScript
Starts a script. NOTE: you are responsible for calling stopScript(), otherwise there will be two threads leaking per call!- Parameters:
scriptName-- Returns:
- the running LoggingProcess
- Throws:
IOException
-
stopScript
Stops a script- Parameters:
loggingProcess- the process to be stopped- Throws:
IOExceptionInterruptedException
-