Class SshExecutionResult


  • public class SshExecutionResult
    extends Object
    This class represents a result of a ssh command execution.
    • Method Detail

      • getStdout

        public String getStdout()
        Get the stdout output of the command.
        Returns:
        stdout
      • getExitCode

        public int getExitCode()
        Get the exit code of the command.
        Returns:
        exit code
      • assertExitCodeIsZero

        public SshExecutionResult assertExitCodeIsZero()
        Check that the exit code was zero and if not print the stderr output and throw an exception.
        Returns:
        self for fluent programming
        Throws:
        IllegalStateException - if exit code was != 0