Package org.jppf.node.event
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
ConstructorsConstructorDescriptionLifeCycleEventHandler(org.jppf.node.Node node) Initialize this event handler with the specified execution manager. -
Method Summary
Modifier and TypeMethodDescriptionvoidNotify all listeners that the node is between jobs.voidfireJobEnding(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.voidfireJobHeaderLoaded(org.jppf.node.protocol.JPPFDistributedJob job, AbstractJPPFClassLoader cl) Notify all listeners that the node has loaded a job header and before theDataProvideror any of the tasks has been loaded..voidfireJobStarting(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.voidNotify all listeners that the node is terminating.voidNotify all listeners that the node is starting.Methods inherited from class org.jppf.utils.ServiceProviderHandler
addProvider, getProviders, loadProviders, removeAllProviders, removeProvider
-
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 theDataProvideror 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.
-