Class ExecResult
java.lang.Object
org.nuxeo.ecm.platform.commandline.executor.api.ExecResult
- All Implemented Interfaces:
Serializable
Wraps result of the command-line execution:
- executed command line,
- output buffer,
- return code,
- java Exception.
- Author:
- tiry
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final CommandException
protected final long
protected int
protected boolean
static final int
-
Constructor Summary
ConstructorDescriptionExecResult
(String timeoutError) Creates a timeout error result.ExecResult
(String commandLine, Exception error) ExecResult
(String commandLine, List<String> output, long execTime, int returnCode) -
Method Summary
Modifier and TypeMethodDescriptiongetError()
Rather rely onisSuccessful()
to check for the execution success.long
int
boolean
boolean
-
Field Details
-
TIMEOUT_RETURN_CODE
public static final int TIMEOUT_RETURN_CODE- See Also:
-
commandLine
-
output
-
execTime
protected final long execTime -
success
protected boolean success -
error
-
returnCode
protected int returnCode
-
-
Constructor Details
-
ExecResult
-
ExecResult
-
ExecResult
Creates a timeout error result.- Since:
- 2021.41
-
-
Method Details
-
getOutput
-
getExecTime
public long getExecTime() -
isSuccessful
public boolean isSuccessful() -
getError
Rather rely onisSuccessful()
to check for the execution success. Note however that since 5.7.3, thegetError()
method cannot return null even if the execution failed (it was not the case before).- Returns:
- CommandException attached to the result, optionally wrapping the root cause.
-
getReturnCode
public int getReturnCode() -
getCommandLine
- Returns:
- the executed command line
- Since:
- 5.5
-
isCommandInTimeout
public boolean isCommandInTimeout()
-