Interface JobListener

  • All Superinterfaces:
    EventListener
    All Known Implementing Classes:
    JobListenerAdapter, TraceListener

    public interface JobListener
    extends EventListener
    Interface to be implemented by clients wishing to receive asynchronous notifications about job progress and/or warnings.

    In order to prevent migration effort you can extend the abstract class JobListenerAdapter and override those methods that are of interest.

    • Method Detail

      • stateChanged

        void stateChanged​(Job job,
                          Job.State oldState,
                          Job.State newState)
        Receive notification about the job's state having changed.
        Parameters:
        job - the affected job
        oldState - the previous state
        newState - the new state
      • executionFailed

        void executionFailed​(Job job,
                             Node node,
                             String messageId,
                             String reason,
                             Throwable cause)
        Receive notification about a failed job execution.
        Parameters:
        job - the affected job
        node - the node causing the failure or null if the failure wasn't related/caused by a particular node
        messageId - qualified message id
        reason - the reason of the failure
        cause - a Throwable
      • errorOccurred

        void errorOccurred​(Job job,
                           Node node,
                           String messageId,
                           String message,
                           Throwable cause)
        Receive notification about a non-fatal error during job execution.
        Parameters:
        job - the affected job
        node - the node causing/issuing the warning or null if the failure wasn't related/caused by a particular node
        message - the warning's details
        messageId - qualified message id
        cause - a Throwable
      • warningOccurred

        void warningOccurred​(Job job,
                             Node node,
                             String messageId,
                             String message,
                             Throwable cause)
        Receive notification about a warning during job execution.
        Parameters:
        job - the affected job
        node - the node causing/issuing the warning or null if the failure wasn't related/caused by a particular node
        message - the warning's details
        messageId - qualified message id
        cause - a Throwable
      • subPipelineCreated

        void subPipelineCreated​(Job job,
                                Node parent,
                                Set<? extends Node> createdNodes)
        Receive notification that new Nodes were created in a sub-pipeline on behalf of another Node during job executing.
        Parameters:
        job - the affected job
        parent - The node that triggered the creation. Might be null in cases where the parent node class is unknown on the client-side classpath
        createdNodes - The nodes that were created
        Since:
        jadice server 4.3.1.0