All Packages Class Hierarchy This Package Previous Next Index
Class javax.infobus.DataItemChangeSupport
java.lang.Object
|
+----javax.infobus.DataItemChangeSupport
- public class DataItemChangeSupport
- extends Object
This class implements the methods defined by DataItemChangeManager for
managing event listeners, and adds specialized methods for firing each
type of change notification. A class that implements DataItemChangeManager
can delegate the work for its methods to the methods defined here, and
the various methods in access interfaces that allow changes to data
can fire events using methods defined here.
- Version:
- $Revision: 1.9 $ $Date: 08 Mar 1998 22:44:18 $
- See Also:
- DataItemChangeManager
-
m_changeListeners
- A Vector containing all registered DataItemChangeListeners.
-
m_source
- The Object that implements DataItemChangeManager, representing the source
of the event.
-
DataItemChangeSupport(Object)
- The constructor initializes an event indicating a change to a data item.
-
addDataItemChangeListener(DataItemChangeListener)
- Adds a change listener as requested by a consumer or other InfoBus component.
-
enumerateListeners()
- Returns an enumeration of a clone of the listener list.
-
fireItemAdded(Object, Object, InfoBusPropertyMap)
- This method is called when one or more new items are being added to a collection.
-
fireItemDeleted(Object, Object, InfoBusPropertyMap)
- This method is called when one or more items are being removed from a collection.
-
fireItemRevoked(Object, InfoBusPropertyMap)
- This method is called when an item or collection is no longer available, such as
when the data source is going offline.
-
fireItemValueChanged(Object, InfoBusPropertyMap)
- This method is called when an item, usually an ImmediateAccess, changes value.
-
fireRowsetCursorMoved(Object, InfoBusPropertyMap)
-
This method should be called when a rowset's cursor has moved to a different row.
-
removeAllListeners()
- This method permits the owner of the data item using the DataItemChangeSupport
to force removal of all registered listeners.
-
removeDataItemChangeListener(DataItemChangeListener)
- Removes a change listener as requested by a consumer or other InfoBus component.
m_source
protected Object m_source
- The Object that implements DataItemChangeManager, representing the source
of the event. Set by the constructor, referenced when firing events.
m_changeListeners
protected Vector m_changeListeners
- A Vector containing all registered DataItemChangeListeners. This Vector
is cloned and then the clone enumerated for event distribution.
DataItemChangeSupport
public DataItemChangeSupport(Object source)
- The constructor initializes an event indicating a change to a data item.
- Parameters:
- source - the data item object that implements the DataItemChangeManager interface,
representing the source of the event. When an instance of this class is a member
field for a data item, the source is a reference to the outer class that
contains the instance of this class.
addDataItemChangeListener
public synchronized void addDataItemChangeListener(DataItemChangeListener listener)
- Adds a change listener as requested by a consumer or other InfoBus component.
- Parameters:
- listener - the change listener object to be registered
removeDataItemChangeListener
public synchronized void removeDataItemChangeListener(DataItemChangeListener listener)
- Removes a change listener as requested by a consumer or other InfoBus component.
- Parameters:
- listener - the change listener object to be unregistered
removeAllListeners
public synchronized void removeAllListeners()
- This method permits the owner of the data item using the DataItemChangeSupport
to force removal of all registered listeners. It should be called only after
those listeners were delivered a DataItemRevoked event by calling
DataItemChangeSupport.fireRevokedEvent AND an InfoBusItemRevokedEvent was sent
on the InfoBus (by calling InfoBus.fireItemRevoked).
enumerateListeners
protected synchronized Enumeration enumerateListeners()
- Returns an enumeration of a clone of the listener list.
By enumerating a clone, the returned enumeration is unaffected by
additions or removals to the master list. Used by all fire methods.
- Returns:
- an Enumeration of a clone of the listener Vector, or null
if that Vector is null.
fireItemValueChanged
public void fireItemValueChanged(Object changedItem,
InfoBusPropertyMap propertyMap)
- This method is called when an item, usually an ImmediateAccess, changes value.
- Parameters:
- changedItem - the Object whose value changed.
fireItemAdded
public void fireItemAdded(Object changedItem,
Object changedCollection,
InfoBusPropertyMap propertyMap)
- This method is called when one or more new items are being added to a collection.
- Parameters:
- changedItem - the Object which was added, or null to indicate that
more than one item was added.
- changedCollection - the collection that gained a new item.
fireItemDeleted
public void fireItemDeleted(Object changedItem,
Object changedCollection,
InfoBusPropertyMap propertyMap)
- This method is called when one or more items are being removed from a collection.
- Parameters:
- changedItem - the Object which was removed, or null to indicate that
more than one item was removed.
- changedCollection - the collection that lost an item.
fireItemRevoked
public void fireItemRevoked(Object changedItem,
InfoBusPropertyMap propertyMap)
- This method is called when an item or collection is no longer available, such as
when the data source is going offline. Unlike the other events, this event is
sent to the data item passed during rendezvous, and to all sub-items in a collection
hierarchy.
- Parameters:
- changedItem - the item or collection that is being revoked.
fireRowsetCursorMoved
public void fireRowsetCursorMoved(Object changedItem,
InfoBusPropertyMap propertyMap)
- This method should be called when a rowset's cursor has moved to a different row.
- Parameters:
- changedItem - the rowset whose cursor changed.
All Packages Class Hierarchy This Package Previous Next Index