Class TaskCallback<T,​O>

  • Type Parameters:
    T - The type of the task object
    O - 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
    • 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 failed
        failureMessage - A failure message (possibly null)
        exception - The exception that caused the failure
      • onSuccess

        public void onSuccess​(T task,
                              O output)
        Invoked after the task has completed
        Parameters:
        task - The task
        output - The output