javax.infobus
Interface DataItemChangeManager


public abstract interface DataItemChangeManager

This interface allows a data item to provide notifications to a consumer when the item has changed, by managing DataItemChangeListeners registered by the consumer for this purpose. We recommend that data items provide change listener support at at all levels of a collection hierarchy where it is possible, to offer maximum flexibility to data consumers. This allows the producer to choose the granularity of notifications it wants.

Data items that implement DataItemChangeManager must support registration and deregistration of event listeners as per section 6.5.1 of the JavaBeans 1.0 specification. Specifically, changes to the listener list may take place during notification of all listeners. Accordingly, the listener list should be copied at the beginning of a change notification, and the copy of the list used for the duration of the notification.


Method Summary
 void addDataItemChangeListener(DataItemChangeListener listener)
          Adds a listener to the list of objects which request notification of modifications to the DataItem's data.
 void removeDataItemChangeListener(DataItemChangeListener listener)
          Removes a listener from the list of objects requesting notification of modifications to the DataItem's data.
 

Method Detail

addDataItemChangeListener

public void addDataItemChangeListener(DataItemChangeListener listener)
Adds a listener to the list of objects which request notification of modifications to the DataItem's data.
Parameters:
listener - the listener to add to the notification list

removeDataItemChangeListener

public void removeDataItemChangeListener(DataItemChangeListener listener)
Removes a listener from the list of objects requesting notification of modifications to the DataItem's data.
Parameters:
listener - the listener to be removed from the notification list