|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommandResponse
The interface to all command responses.
| Method Summary | |
|---|---|
Command |
getCommand()
If the command was issued with Command.isCommandInResponse() set to true, this will return a
copy of the Command object that was executed. |
Throwable |
getException()
If a command fails to execute, this may provide the exception (more specifically, a
java.lang.Throwable) that caused the failure. |
Object |
getResults()
Provides the command's results. |
boolean |
isSuccessful()
Returns true if the command was executed successfully, false if any error occurred that
caused the command to fail. |
| Method Detail |
|---|
boolean isSuccessful()
true if the command was executed successfully, false if any error occurred that
caused the command to fail.
true if the command was successful, false otherwisegetResults()Command getCommand()
Command.isCommandInResponse() set to true, this will return a
copy of the Command object that was executed. This is helpful in allowing for the client processing the
response to know what command was executed.
To determine the actual results of the executed command, see getResults().
null if not availableObject getResults()
null, irregardless of whether the command was
successful or not. The return value of this method may or may not be valid if isSuccessful() returns
false. It is up to each implementor of this interface to determine the semantics of these
conditions.
Throwable getException()
java.lang.Throwable) that caused the failure. Typically, the returned value will be null if
isSuccessful() returns true and will be non-null if isSuccessful()
returns false. However, it is up to the implementor of this interface to determine whether or not to
follow these guidelines. Implementors of this interface will determine when or if it will supply an exception.
Note that it might be valid to have both a non-null exception and a
non-nullresult.
Note that the exception may or may not have occurred on the server that executed the command.
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||