org.nodal.util
Class MonitoredUtil

java.lang.Object
  extended byorg.nodal.util.MonitoredUtil
All Implemented Interfaces:
Monitored

public class MonitoredUtil
extends java.lang.Object
implements Monitored

Standard implementation of the Monitored interface.

This class is designed to be extended by any class that wishes to implement the Monitored interface. It implements all of the methods to manage Monitors and provides two methods (signalBeginChange and signalEndChange) that the ancestor classes should call whenever a modification is processed. These methods will the call beginChange and endChange for all registered Monitors.


Constructor Summary
protected MonitoredUtil()
           
 
Method Summary
 boolean addMonitor(Monitor m)
          Add a monitor that will track changes to this value.
 void clearMonitors()
          Remove all previously added monitors.
 boolean removeMonitor(Monitor m)
          Remove a previously added monitor.
protected  void signalBeginChange(Getter g)
          Signal the start of a change to the Monitored resource.
protected  void signalEndChange(Getter g)
          Signal the end of a change to the Monitored resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitoredUtil

protected MonitoredUtil()
Method Detail

addMonitor

public boolean addMonitor(Monitor m)
Add a monitor that will track changes to this value.

Specified by:
addMonitor in interface Monitored

removeMonitor

public boolean removeMonitor(Monitor m)
Remove a previously added monitor.

Specified by:
removeMonitor in interface Monitored

clearMonitors

public void clearMonitors()
Remove all previously added monitors.

Specified by:
clearMonitors in interface Monitored

signalBeginChange

protected void signalBeginChange(Getter g)
Signal the start of a change to the Monitored resource.


signalEndChange

protected void signalEndChange(Getter g)
Signal the end of a change to the Monitored resource.