Package org.glassfish.embeddable
Interface CommandResult
-
public interface CommandResult
Encapsulates the result of a command invoked usingCommandRunner.run(java.lang.String, java.lang.String...)
.- Author:
- [email protected]
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CommandResult.ExitStatus
A command can have following types of exit status.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandResult.ExitStatus
getExitStatus()
Throwable
getFailureCause()
This method returns any exception raised during command invocation, If the command's exit status isCommandResult.ExitStatus.SUCCESS
, then this method will return null.String
getOutput()
-
-
-
Method Detail
-
getExitStatus
CommandResult.ExitStatus getExitStatus()
- Returns:
- exit status of the command
-
getOutput
String getOutput()
- Returns:
- command output
-
getFailureCause
Throwable getFailureCause()
This method returns any exception raised during command invocation, If the command's exit status isCommandResult.ExitStatus.SUCCESS
, then this method will return null.- Returns:
- any exception that occurred during this command execution.
-
-