|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.common.properties.PropertyEventDispatcher
A thread-safe class for dispatching property events to a collection of property listeners.
This class implements the PropertyListener interface
for the sake of consistency. Each time one of the methods of this
interface is invoked, the corresponding event will be dispatched to
each of the registered listeners.
| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private java.util.Collection |
mListeners
|
| Constructor Summary | |
PropertyEventDispatcher()
|
|
| Method Summary | |
void |
addPropertyListener(PropertyListener listener)
Registers a property listner which will be notified of subsequent property events. |
void |
propertyAdded(PropertyEvent event)
Handles the property added event by invoking the propertyAdded() method on each property listener. |
void |
propertyRemoved(PropertyEvent event)
Handles the property removed event by invoking the propertyRemoved() method on each property listener. |
void |
propertyUpdated(PropertyEvent event)
Handles the property updated event by invoking the propertyUpdated() method on each property listener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private final java.util.Collection mListeners
| Constructor Detail |
public PropertyEventDispatcher()
| Method Detail |
public void addPropertyListener(PropertyListener listener)
listener - The PropertyListener to register
java.lang.IllegalArgumentException - if listener is
null.public void propertyAdded(PropertyEvent event)
propertyAdded() method on each property listener.
propertyAdded in interface PropertyListenerevent - Describes details of the event.
java.lang.IllegalArgumentException - if event is
null.PropertyListener.propertyAdded(uk.org.ogsadai.common.properties.PropertyEvent)public void propertyRemoved(PropertyEvent event)
propertyRemoved() method on each property listener.
propertyRemoved in interface PropertyListenerevent - Describes details of the event.
java.lang.IllegalArgumentException - if event is
null.PropertyListener.propertyRemoved(uk.org.ogsadai.common.properties.PropertyEvent)public void propertyUpdated(PropertyEvent event)
propertyUpdated() method on each property listener.
propertyUpdated in interface PropertyListenerevent - Describes details of the event.
java.lang.IllegalArgumentException - if event is
null.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||