Package org.jppf.server.nio.nodeserver
Class PeerAttributesHandler
java.lang.Object
org.jppf.server.nio.nodeserver.PeerAttributesHandler
- All Implemented Interfaces:
EventListener,NotificationListener
- Author:
- Laurent Cohen
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPeerAttributesHandler(JPPFDriver driver, int nbThreads) Initialize this handler. -
Method Summary
Modifier and TypeMethodDescriptionintGet the total number of fully connected nodes.intGet the total number of processing threads for all fully connected nodes.voidhandleNotification(Notification notification, Object handback) voidonCloseNode(BaseNodeContext context) Called when a node gets closed.voidonNodeConnected(BaseNodeContext context) Called when a node gets connected to the server.
-
Field Details
-
PEER_TOTAL_NODES
Property for total nodes attached to a peer driver.- See Also:
-
PEER_TOTAL_THREADS
Property for total threads for the nodes attached to a peer driver.
-
-
Constructor Details
-
PeerAttributesHandler
Initialize this handler.- Parameters:
driver- reference to the JPPF driver.nbThreads- the number of threads in the thread pool.
-
-
Method Details
-
getTotalNodes
public int getTotalNodes()Get the total number of fully connected nodes.- Returns:
- the total number of nodes.
-
getTotalThreads
public int getTotalThreads()Get the total number of processing threads for all fully connected nodes.- Returns:
- the total number of threads.
-
onCloseNode
Called when a node gets closed.- Parameters:
context- the node context.
-
onNodeConnected
Called when a node gets connected to the server.- Parameters:
context- the node context.
-
handleNotification
- Specified by:
handleNotificationin interfaceNotificationListener
-