Package org.jppf.server.event
Class NodeConnectionEventHandler
java.lang.Object
org.jppf.utils.ServiceProviderHandler<NodeConnectionListener>
org.jppf.server.event.NodeConnectionEventHandler
public class NodeConnectionEventHandler
extends org.jppf.utils.ServiceProviderHandler<NodeConnectionListener>
This class handles operations for node connection events, including
listener registration, event notifications and initial loading of listeners via SPI.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.utils.ServiceProviderHandler
classLoader, inf, providers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfireNodeConnected(org.jppf.management.JPPFManagementInfo info) Notify all listeners that a node is connected tot he server.voidfireNodeDisconnected(org.jppf.management.JPPFManagementInfo info) Notify all listeners that a node is disconnected from the server.intintintvoidLoad all listener instances found in the class path via a service definition.Methods inherited from class org.jppf.utils.ServiceProviderHandler
addProvider, getProviders, loadProviders, removeAllProviders, removeProvider
-
Constructor Details
-
NodeConnectionEventHandler
public NodeConnectionEventHandler()Default constructor.
-
-
Method Details
-
fireNodeConnected
public void fireNodeConnected(org.jppf.management.JPPFManagementInfo info) Notify all listeners that a node is connected tot he server.- Parameters:
info- encapsulates the information about the node.
-
fireNodeDisconnected
public void fireNodeDisconnected(org.jppf.management.JPPFManagementInfo info) Notify all listeners that a node is disconnected from the server.- Parameters:
info- encapsulates the information about the node.
-
loadListeners
public void loadListeners()Load all listener instances found in the class path via a service definition. -
getConnectedNodes
public int getConnectedNodes()- Returns:
- the number of connected nodes.
-
getConnectedPeers
public int getConnectedPeers()- Returns:
- the number of connected peers.
-
getConnectedRealNodes
public int getConnectedRealNodes()- Returns:
- the number of connected real (not peer) nodes.
-