public class StartCommandResponse extends AbstractCommandResponse
The results object (if command was successful) will be the exit code (as an Integer) of the process (if the
command has its StartCommand#isWaitForExit() set to true). The results object will be
null if that wait flag is false.
| Constructor and Description |
|---|
StartCommandResponse(Command command)
Creates a response, however, there is no associated exit code (due to the fact that the original command did not
request that the command service wait for the process to exit).
|
StartCommandResponse(Command command,
Integer exitCode)
Creates a response that considers the command a success, with the
exitCode passed as the result
object. |
StartCommandResponse(CommandResponse responseToTransform)
Constructor for
StartCommandResponse ; |
StartCommandResponse(Command command,
Throwable exception)
Creates a response that considers the command a failure with the given exception stored in the response.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getExitCode()
Convienence method that provides a strongly-typed return value of the exit code.
|
getCommand, getException, getResults, isSuccessful, setCommand, setException, setResults, setSuccessful, toStringpublic StartCommandResponse(Command command)
public StartCommandResponse(Command command, Integer exitCode)
exitCode passed as the result
object. The exit code is the process's exit code that it returned when it stopped.command - the command that succeededexitCode - the exit codepublic StartCommandResponse(Command command, Throwable exception)
command - the command that failedexception - that caused the failurepublic StartCommandResponse(CommandResponse responseToTransform)
StartCommandResponse ;public Integer getExitCode()
null. The
returned value will also be null if the process failed to start; in which case, get the
AbstractCommandResponse.getException() that caused the failure.null if the process failed to start or the command service
didn't wait for it to exitCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.