com.dtolabs.rundeck.core.execution
Class BaseExecutionResult

java.lang.Object
  extended by com.dtolabs.rundeck.core.execution.BaseExecutionResult
All Implemented Interfaces:
ExceptionStatusResult, ExecutionResult, StatusResult

public class BaseExecutionResult
extends java.lang.Object
implements ExecutionResult

BaseExecutionResult implements ExecutionResult and provides factory methods for creating success or failure results


Method Summary
static ExecutionResult create(boolean success, DispatcherResult object)
          Create a Success result with an object
static ExecutionResult createFailure(java.lang.Exception exception)
          Create a failure result with an exception
static ExecutionResult createSuccess(DispatcherResult object)
          Create a Success result with an object
 java.lang.Exception getException()
          Return any exception that was caught
 DispatcherResult getResultObject()
           
 boolean isSuccess()
          Return true if the result was successful
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static ExecutionResult create(boolean success,
                                     DispatcherResult object)
Create a Success result with an object

Parameters:
object - result object
Returns:
success result containing the object

createSuccess

public static ExecutionResult createSuccess(DispatcherResult object)
Create a Success result with an object

Parameters:
object - result object
Returns:
success result containing the object

createFailure

public static ExecutionResult createFailure(java.lang.Exception exception)
Create a failure result with an exception

Parameters:
exception - exception
Returns:
failure result containing the exception

isSuccess

public boolean isSuccess()
Description copied from interface: StatusResult
Return true if the result was successful

Specified by:
isSuccess in interface StatusResult

getException

public java.lang.Exception getException()
Description copied from interface: ExceptionStatusResult
Return any exception that was caught

Specified by:
getException in interface ExceptionStatusResult

getResultObject

public DispatcherResult getResultObject()
Specified by:
getResultObject in interface ExecutionResult

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object