com.ibm.websphere.management.cmdframework.provider
Class CommandResultImpl
- java.lang.Object
com.ibm.websphere.management.cmdframework.provider.CommandResultImpl
All implemented interfaces:
CommandResult, java.io.Serializable
Direct known subclasses:
- public class CommandResultImpl
- extends java.lang.Object
- implements CommandResult
See Also:
Constructor Summary
Constructor and Description |
---|
CommandResultImpl()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addWarnings(java.lang.String msg)
Adds a localized warning message.
|
|
getException()
|
|
getMessages()
|
|
getResult()
|
|
isSuccessful()
|
|
reset()
This method should be called first to fill in the execution result.
|
|
setException(java.lang.Throwable thisThrowable)
Sets the exception for result if any exception is thrown.
|
|
setResult(java.lang.Object obj)
Adds an object command execution result.
|
|
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail
CommandResultImpl
- public CommandResultImpl()
Method Detail
reset
- public void reset()
This method should be called first to fill in the execution result.
isSuccessful
- public boolean isSuccessful()
Description copied from interface:
CommandResult
Returns if the last command execution is successful or not.
Specified by:
isSuccessful
in interface CommandResult
Returns:
true if command is executed successfully; false otherwise.
getMessages
- public java.util.Collection getMessages( )
Description copied from interface:
CommandResult
Gets warning messages if there is any.
Specified by:
getMessages
in interface CommandResult
Returns:
a collection of messages.
getException
- public java.lang.Throwable getException( )
Description copied from interface:
CommandResult
Gets the exception if the command execution failed.
This returns null if the command is executed successfully.
Specified by:
getException
in interface CommandResult
Returns:
the exception thrown during the command execution.
getResult
- public java.lang.Object getResult( )
Description copied from interface:
CommandResult
Gets the result of the command execution if the execution is successful.
This method returns null if the command execution failed.
Specified by:
getResult
in interface CommandResult
Returns:
the result of the command execution.
setException
- public void setException(java.lang.Throwable thisThrowable)
Sets the exception for result if any exception is thrown.
addWarnings
- public void addWarnings(java.lang.String msg)
Adds a localized warning message.
setResult
- public void setResult(java.lang.Object obj)
Adds an object command execution result. In most of cases, there should only be one
object, but there might be multiple objects too.
toString
- public java.lang.String toString( )
Overrides:
toString
in class java.lang.Object