public class RemoteCommandRunner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
error |
private int |
exitCode |
private static org.slf4j.Logger |
LOGGER |
private java.lang.String |
output |
Constructor and Description |
---|
RemoteCommandRunner(Xenon xenon,
Scheduler scheduler,
java.lang.String adaptorName,
java.lang.String stdin,
java.lang.String executable,
java.lang.String... arguments)
Run a command remotely, and save stdout, stderr, and exit code for later processing.
|
Modifier and Type | Method and Description |
---|---|
int |
getExitCode() |
java.lang.String |
getStderr() |
java.lang.String |
getStdout() |
boolean |
success() |
java.lang.String |
toString() |
private static final org.slf4j.Logger LOGGER
private final int exitCode
private final java.lang.String output
private final java.lang.String error
public RemoteCommandRunner(Xenon xenon, Scheduler scheduler, java.lang.String adaptorName, java.lang.String stdin, java.lang.String executable, java.lang.String... arguments) throws XenonException
xenon
- the Xenon to usescheduler
- the scheduler to submit the job toadaptorName
- the name of the adaptor running this command (used in exception if thrown)stdin
- input to feed to the commandexecutable
- command to runarguments
- arguments for the commandXenonException
- if the job could not be run successfully.