Class LifeCycleEventHandler

java.lang.Object
org.jppf.utils.ServiceProviderHandler<NodeLifeCycleListener>
org.jppf.node.event.LifeCycleEventHandler

public class LifeCycleEventHandler extends org.jppf.utils.ServiceProviderHandler<NodeLifeCycleListener>
This class handles the firing of node life cycle events and the listeners that subscribe to these events.
Author:
Laurent Cohen
  • Field Summary

    Fields inherited from class org.jppf.utils.ServiceProviderHandler

    classLoader, inf, providers
  • Constructor Summary

    Constructors
    Constructor
    Description
    LifeCycleEventHandler(org.jppf.node.Node node)
    Initialize this event handler with the specified execution manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notify all listeners that the node is between jobs.
    void
    fireJobEnding(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl, List<org.jppf.node.protocol.Task<?>> tasks, org.jppf.node.protocol.DataProvider dataProvider)
    Notify all listeners that the node is completing a job.
    void
    fireJobHeaderLoaded(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl)
    Notify all listeners that the node has loaded a job header and before the DataProvider or any of the tasks has been loaded..
    void
    fireJobStarting(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl, List<org.jppf.node.protocol.Task<?>> tasks, org.jppf.node.protocol.DataProvider dataProvider)
    Notify all listeners that the node is starting a job.
    void
    Notify all listeners that the node is terminating.
    void
    Notify all listeners that the node is starting.

    Methods inherited from class org.jppf.utils.ServiceProviderHandler

    addProvider, getProviders, loadProviders, removeAllProviders, removeProvider

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LifeCycleEventHandler

      public LifeCycleEventHandler(org.jppf.node.Node node)
      Initialize this event handler with the specified execution manager.
      Parameters:
      node - an object representing the JPPF node.
  • Method Details

    • fireNodeStarting

      public void fireNodeStarting()
      Notify all listeners that the node is starting.
    • fireNodeEnding

      public void fireNodeEnding()
      Notify all listeners that the node is terminating.
    • fireJobHeaderLoaded

      public void fireJobHeaderLoaded(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl)
      Notify all listeners that the node has loaded a job header and before the DataProvider or any of the tasks has been loaded..
      Parameters:
      job - the job that is about to be or has been executed.
      cl - the class loader used to load the tasks and the classes they need from the client.
    • fireJobStarting

      public void fireJobStarting(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl, List<org.jppf.node.protocol.Task<?>> tasks, org.jppf.node.protocol.DataProvider dataProvider)
      Notify all listeners that the node is starting a job.
      Parameters:
      job - the job that is about to be or has been executed.
      cl - the class loader used to load the tasks and the classes they need from the client.
      tasks - the tasks about to be or which have been executed.
      dataProvider - the data provider for the current job.
    • fireJobEnding

      public void fireJobEnding(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl, List<org.jppf.node.protocol.Task<?>> tasks, org.jppf.node.protocol.DataProvider dataProvider)
      Notify all listeners that the node is completing a job.
      Parameters:
      job - the job that is about to be or has been executed.
      cl - the class loader used to load the tasks and the classes they need from the client.
      tasks - the tasks about to be or which have been executed.
      dataProvider - the data provider for the current job.
    • fireBeforeNextJob

      public void fireBeforeNextJob()
      Notify all listeners that the node is between jobs.