Package com.identityworksllc.iiq.common
Class TaskCallback<T,O>
- java.lang.Object
-
- com.identityworksllc.iiq.common.TaskCallback<T,O>
-
- Type Parameters:
T- The type of the task objectO- The type of the output object
- All Implemented Interfaces:
Serializable
public abstract class TaskCallback<T,O> extends Object implements Serializable
A generic task callback that can be used in various contexts.A subclass can provide hooks for any part of the task process.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaskCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterFinish(T task)Invoked in a ‘finally’ after the task completes, but before it returns to the orchestratorvoidbeforeStart(T task)Invoked prior to the start of the taskvoidonFailure(T task, String failureMessage, Exception exception)Invoked after the task has failedvoidonSuccess(T task, O output)Invoked after the task has completed
-
-
-
Constructor Detail
-
TaskCallback
public TaskCallback()
-
-
Method Detail
-
afterFinish
public void afterFinish(T task)
Invoked in a ‘finally’ after the task completes, but before it returns to the orchestrator- Parameters:
task- The task object
-
beforeStart
public void beforeStart(T task) throws sailpoint.tools.GeneralException
Invoked prior to the start of the task- Parameters:
task- The task that is about to start- Throws:
sailpoint.tools.GeneralException- on failures; aborts the task
-
onFailure
public void onFailure(T task, String failureMessage, Exception exception)
Invoked after the task has failed- Parameters:
task- The task that has failedfailureMessage- A failure message (possibly null)exception- The exception that caused the failure
-
-