public class DefaultProcessRunner extends java.lang.Object implements ProcessRunner
| Constructor and Description |
|---|
DefaultProcessRunner(java.io.File workDir)
|
DefaultProcessRunner(java.io.File workDir,
java.io.File outputLogFile)
Create Process runner
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
run(java.util.List<java.lang.String> commandLine)
Executes given command line and returns result.
|
java.lang.String |
run(java.lang.String... commandLine)
Executes given command line and returns the output.
|
DefaultProcessRunner |
setSecretValue(java.lang.String secretValue) |
public DefaultProcessRunner(java.io.File workDir)
public DefaultProcessRunner(java.io.File workDir,
java.io.File outputLogFile)
workDir - Work directory where to start a processoutputLogFile - If process create a long output it's better to save it in filepublic java.lang.String run(java.lang.String... commandLine)
ProcessRunnerrun in interface ProcessRunnercommandLine - to executepublic java.lang.String run(java.util.List<java.lang.String> commandLine)
ProcessRunnerrun in interface ProcessRunnercommandLine - the full command line to executepublic DefaultProcessRunner setSecretValue(java.lang.String secretValue)
secretValue - to be masked from the output and logging