Class RemoteCommandRunner


  • public class RemoteCommandRunner
    extends java.lang.Object
    Runs a command. Constructor waits for command to finish.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String error  
      private int exitCode  
      private static org.slf4j.Logger LOGGER  
      private java.lang.String output  
    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteCommandRunner​(Scheduler scheduler, 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.
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • exitCode

        private final int exitCode
      • output

        private final java.lang.String output
      • error

        private final java.lang.String error
    • Constructor Detail

      • RemoteCommandRunner

        public RemoteCommandRunner​(Scheduler scheduler,
                                   java.lang.String stdin,
                                   java.lang.String executable,
                                   java.lang.String... arguments)
                            throws XenonException
        Run a command remotely, and save stdout, stderr, and exit code for later processing.
        Parameters:
        scheduler - the scheduler to submit the job to
        stdin - input to feed to the command
        executable - command to run
        arguments - arguments for the command
        Throws:
        XenonException - if the job could not be run successfully.
    • Method Detail

      • getStdout

        public java.lang.String getStdout()
      • getStderr

        public java.lang.String getStderr()
      • getExitCode

        public int getExitCode()
      • success

        public boolean success()
      • successIgnoreError

        public boolean successIgnoreError()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object