Class BaseExecutionResult
- java.lang.Object
-
- 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExecutionResultcreate(boolean success, DispatcherResult object)Create a Success result with an objectstatic ExecutionResultcreateFailure(java.lang.Exception exception)Create a failure result with an exceptionstatic ExecutionResultcreateSuccess(DispatcherResult object)Create a Success result with an objectjava.lang.ExceptiongetException()DispatcherResultgetResultObject()booleanisSuccess()java.lang.StringtoString()
-
-
-
Method Detail
-
create
public static ExecutionResult create(boolean success, DispatcherResult object)
Create a Success result with an object- Parameters:
success- true if successfulobject- 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()
- Specified by:
isSuccessin interfaceStatusResult- Returns:
- true if the result was successful
-
getException
public java.lang.Exception getException()
- Specified by:
getExceptionin interfaceExceptionStatusResult- Returns:
- any exception that was caught
-
getResultObject
public DispatcherResult getResultObject()
- Specified by:
getResultObjectin interfaceExecutionResult
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-