com.ibm.websphere.management.cmdframework

Interface CommandResult

All Superinterfaces:
java.io.Serializable
All known subinterfaces:
TaskCommandResult
All known implementing classes:
CommandResultImpl, TaskCommandResultImpl

  1. public interface CommandResult
  2. extends java.io.Serializable
An interface that defines the command execution result.

Method Summary

Modifier and Type Method and Description
  1. java.lang.Throwable
getException()
Gets the exception if the command execution failed.
  1. java.util.Collection
getMessages()
Gets warning messages if there is any.
  1. java.lang.Object
getResult()
Gets the result of the command execution if the execution is successful.
  1. boolean
isSuccessful()
Returns if the last command execution is successful or not.

Method Detail

isSuccessful

  1. boolean isSuccessful()
Returns if the last command execution is successful or not.
Returns:
true if command is executed successfully; false otherwise.

getMessages

  1. java.util.Collection getMessages( )
Gets warning messages if there is any.
Returns:
a collection of messages.

getException

  1. java.lang.Throwable getException( )
Gets the exception if the command execution failed. This returns null if the command is executed successfully.
Returns:
the exception thrown during the command execution.

getResult

  1. java.lang.Object getResult()
Gets the result of the command execution if the execution is successful. This method returns null if the command execution failed.
Returns:
the result of the command execution.