Class RemoteResponse

java.lang.Object
io.gem.api.RemoteResponse

public final class RemoteResponse extends Object
Immutable result of executing a command on a remote host.

Captures the exit status, stdout/stderr text, and the host identifier so callers can correlate results across multiple nodes.

  • Field Details

    • UNKNOWN_RETURN_CODE

      public static final int UNKNOWN_RETURN_CODE
      Sentinel used when SSH did not provide a remote process exit code.
      See Also:
    • returnCode

      public final int returnCode
      int returnCode.
    • stdOutput

      public final String stdOutput
      String stdOutput.
    • errOutput

      public final String errOutput
      String errOutput.
    • host

      public final String host
      String host.
    • status

      public final RemoteExecutionStatus status
      Terminal remote execution classification.
    • failureMessage

      public final String failureMessage
      Host-tagged failure description, empty for successful commands.
  • Constructor Details

    • RemoteResponse

      public RemoteResponse(int returnCode, String stdOutput, String errOutput, String host)
      Create a remote response snapshot.
      Parameters:
      returnCode - exit status returned by the remote command
      stdOutput - captured standard output
      errOutput - captured standard error
      host - remote host identifier for this response
    • RemoteResponse

      public RemoteResponse(int returnCode, String stdOutput, String errOutput, String host, RemoteExecutionStatus status, String failureMessage)
      Create a fully classified remote response snapshot.
      Parameters:
      returnCode - exit status, or UNKNOWN_RETURN_CODE when unavailable
      stdOutput - bounded standard-output tail
      errOutput - bounded standard-error tail
      host - remote host identifier
      status - terminal execution status
      failureMessage - host-tagged failure detail