public abstract class AbstractProcessExec extends Object implements ScriptExec
| Modifier and Type | Field and Description |
|---|---|
static String |
DESTROY_ON_TIMEOUT |
static boolean |
DESTROY_ON_TIMEOUT_DEFAULT
Default
destroyOnTimeout value, set to true. |
static Boolean |
ERR_STRING_DEFAULT
Default
errString value, set to false. |
static String |
EXIT_CODE |
static int |
EXIT_CODE_DEFAULT
Default
exitCode value, set to 0. |
static String |
EXIT_CODES |
static boolean |
OUT_STRING_DEFAULT
Default
outString value, set to false. |
static String |
TIMEOUT |
static org.joda.time.Duration |
TIMEOUT_DEFAULT
Default
timeout duration, set to 60 seconds. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProcessExec(Threads threads,
Map<String,Object> args)
Sets the threads pool and the arguments.
|
| Modifier and Type | Method and Description |
|---|---|
ProcessTask |
call()
Executes the script.
|
protected abstract CommandLine |
createCommandLine(ScriptCommandLineFactory commandLineFactory)
Creates the command line for the process.
|
String |
getScriptString()
Returns the script that was executed.
|
protected void |
setupCommandError(CommandExec script,
CommandLine line) |
protected void |
setupCommandOutput(CommandExec script,
CommandLine line) |
public static final Boolean ERR_STRING_DEFAULT
errString value, set to false.public static final boolean OUT_STRING_DEFAULT
outString value, set to false.public static final boolean DESTROY_ON_TIMEOUT_DEFAULT
destroyOnTimeout value, set to true.public static final int EXIT_CODE_DEFAULT
exitCode value, set to 0.public static final org.joda.time.Duration TIMEOUT_DEFAULT
timeout duration, set to 60 seconds.public static final String TIMEOUT
public static final String DESTROY_ON_TIMEOUT
public static final String EXIT_CODES
public static final String EXIT_CODE
public ProcessTask call() throws CommandExecException
ScriptExeccall in interface ScriptExeccall in interface Callable<ProcessTask>CommandExecExceptionpublic String getScriptString()
ScriptExecgetScriptString in interface ScriptExecString.protected abstract CommandLine createCommandLine(ScriptCommandLineFactory commandLineFactory)
commandLineFactory - the ScriptCommandLineFactory.CommandLine.protected void setupCommandOutput(CommandExec script, CommandLine line)
protected void setupCommandError(CommandExec script, CommandLine line)
Copyright © 2014–2016. All rights reserved.