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 CommandStatus.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

public CommandResult ()

Create a CommandResult with the default CommandStatus.TIMED_OUT status.

CommandResult

public CommandResult (CommandStatus status)

Create a CommandResult with the given status.

Parameters
status CommandStatus: the CommandStatus

Public methods

getStatus

public CommandStatus getStatus ()

Get status of command.

Returns
CommandStatus the CommandStatus

getStderr

public String getStderr ()

Get the standard error output produced by command.

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

getStdout

public String getStdout ()

Get the standard output produced by command.

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

setStatus

public void setStatus (CommandStatus status)

Parameters
status CommandStatus

setStderr

public void setStderr (String stderr)

Parameters
stderr String

setStdout

public void setStdout (String stdout)

Parameters
stdout String