net.sf.doolin.bus.bean
Class BeanNotificationSupport
java.lang.Object
net.sf.doolin.bus.bean.BeanNotificationSupport
public class BeanNotificationSupport
- extends Object
This class defines an object that can notify the changes of an object to the
bus.
Notification of changes can be done on the spot, or buffered or completely
stopped.
Any BeanNotificationSupport can have a parent and we can
therefore define a hierarchy of beans.
Each level in the hierarchy participates in the notification of changes.
For example, in the following hierarchy:
A {
B b;
}
B {
C c;
}
C {
String name;
}
If C notifies a change on name as in:
C {
...
notify("name", "Old value", "A new name");
...
}
Following events are generated on the bus:
C.name := "A new name";
B.c.name := "A new name";
A.b.c.name := "A new name";
- Author:
- Damien Coraboeuf
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanNotificationSupport
public BeanNotificationSupport(Object holder)
createMessage
protected PropertyChangeMessage createMessage(String propertyName,
Object oldValue,
Object newValue)
notify
public void notify(String propertyName,
Object oldValue,
Object newValue)
- Notifies to the bus that a property has changed. If the notification mode
is BUFFERED, the change will be actually sent when notification mode is
restored to NORMAL.
- Parameters:
propertyName - Name of the propertyoldValue - Old value of the propertynewValue - New value of the property- See Also:
PropertyChangeMessage
Copyright © 2011. All Rights Reserved.