Class RemoteResponse
java.lang.Object
io.gem.api.RemoteResponse
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 Summary
FieldsModifier and TypeFieldDescriptionfinal StringString errOutput.final StringHost-tagged failure description, empty for successful commands.final StringString host.final intint returnCode.final RemoteExecutionStatusTerminal remote execution classification.final StringString stdOutput.static final intSentinel used when SSH did not provide a remote process exit code. -
Constructor Summary
ConstructorsConstructorDescriptionRemoteResponse(int returnCode, String stdOutput, String errOutput, String host) Create a remote response snapshot.RemoteResponse(int returnCode, String stdOutput, String errOutput, String host, RemoteExecutionStatus status, String failureMessage) Create a fully classified remote response snapshot. -
Method Summary
-
Field Details
-
UNKNOWN_RETURN_CODE
public static final int UNKNOWN_RETURN_CODESentinel used when SSH did not provide a remote process exit code.- See Also:
-
returnCode
public final int returnCodeint returnCode. -
stdOutput
String stdOutput. -
errOutput
String errOutput. -
host
String host. -
status
Terminal remote execution classification. -
failureMessage
Host-tagged failure description, empty for successful commands.
-
-
Constructor Details
-
RemoteResponse
Create a remote response snapshot.- Parameters:
returnCode- exit status returned by the remote commandstdOutput- captured standard outputerrOutput- captured standard errorhost- 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, orUNKNOWN_RETURN_CODEwhen unavailablestdOutput- bounded standard-output tailerrOutput- bounded standard-error tailhost- remote host identifierstatus- terminal execution statusfailureMessage- host-tagged failure detail
-