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
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fireNodeConnected(org.jppf.management.JPPFManagementInfo info)
    Notify all listeners that a node is connected tot he server.
    void
    fireNodeDisconnected(org.jppf.management.JPPFManagementInfo info)
    Notify all listeners that a node is disconnected from the server.
    int
     
    int
     
    int
     
    void
    Load 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.