CommandResult

public class CommandResult
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.CommandResult


Contains the result of a command.

Summary

Public constructors

CommandResult()

Create a CommandResult with the default TIMED_OUT status.

CommandResult(CommandStatus status)

Create a CommandResult with the given status.

Public methods

CommandStatus getStatus()

Get status of command.

String getStderr()

Get the standard error output produced by command.

String getStdout()

Get the standard output produced by command.

void setStatus(CommandStatus status)
void setStderr(String stderr)
void setStdout(String stdout)

Public constructors

CommandResult

CommandResult ()

Create a CommandResult with the default TIMED_OUT status.

CommandResult

CommandResult (CommandStatus status)

Create a CommandResult with the given status.

Parameters
status CommandStatus: the CommandStatus

Public methods

getStatus

CommandStatus getStatus ()

Get status of command.

Returns
CommandStatus the CommandStatus

getStderr

String getStderr ()

Get the standard error output produced by command.

Returns
String the standard error or null if output could not be retrieved

getStdout

String getStdout ()

Get the standard output produced by command.

Returns
String the standard output or null if output could not be retrieved

setStatus

void setStatus (CommandStatus status)

Parameters
status CommandStatus

setStderr

void setStderr (String stderr)

Parameters
stderr String

setStdout

void setStdout (String stdout)

Parameters
stdout String