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 ExecutionResult
create(boolean success, DispatcherResult object)
Create a Success result with an objectstatic ExecutionResult
createFailure(java.lang.Exception exception)
Create a failure result with an exceptionstatic ExecutionResult
createSuccess(DispatcherResult object)
Create a Success result with an objectjava.lang.Exception
getException()
DispatcherResult
getResultObject()
boolean
isSuccess()
java.lang.String
toString()
-
-
-
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:
isSuccess
in interfaceStatusResult
- Returns:
- true if the result was successful
-
getException
public java.lang.Exception getException()
- Specified by:
getException
in interfaceExceptionStatusResult
- Returns:
- any exception that was caught
-
getResultObject
public DispatcherResult getResultObject()
- Specified by:
getResultObject
in interfaceExecutionResult
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-