org.jppf.node
Interface MonitoredNode

All Superinterfaces:
Runnable
All Known Implementing Classes:
AbstractMonitoredNode, JPPFLocalNode, JPPFNode, JPPFRemoteNode

public interface MonitoredNode
extends Runnable

Interface for a node that provides information about its activity.

Author:
Laurent Cohen

Method Summary
 void addNodeListener(NodeListener listener)
          Add a listener to the list of listener for this node.
 void fireNodeEvent(int nbTasks)
          Create an event for the execution of a specified number of tasks.
 void fireNodeEvent(NodeEventType eventType)
          Notify all listeners that an event has occurred.
 SocketWrapper getSocketWrapper()
          Get the underlying socket used by this node.
 void removeNodeListener(NodeListener listener)
          Remove a listener from the list of listener for this node.
 void setSocketWrapper(SocketWrapper socketWrapper)
          Set the underlying socket to be used by this node.
 void stopNode(boolean closeDataChannel)
          Stop this node and release the resources it is using.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

getSocketWrapper

SocketWrapper getSocketWrapper()
Get the underlying socket used by this node.

Returns:
a SocketWrapper instance.

setSocketWrapper

void setSocketWrapper(SocketWrapper socketWrapper)
Set the underlying socket to be used by this node.

Parameters:
socketWrapper - a SocketWrapper instance.

addNodeListener

void addNodeListener(NodeListener listener)
Add a listener to the list of listener for this node.

Parameters:
listener - the listener to add.

removeNodeListener

void removeNodeListener(NodeListener listener)
Remove a listener from the list of listener for this node.

Parameters:
listener - the listener to remove.

fireNodeEvent

void fireNodeEvent(NodeEventType eventType)
Notify all listeners that an event has occurred.

Parameters:
eventType - the type of the event as an enumerated value.

fireNodeEvent

void fireNodeEvent(int nbTasks)
Create an event for the execution of a specified number of tasks.

Parameters:
nbTasks - the number of tasks as an int.

stopNode

void stopNode(boolean closeDataChannel)
Stop this node and release the resources it is using.

Parameters:
closeDataChannel - determines whether the underlying data channel should be closed.


Copyright © 2005-2010 JPPF Team.