Class dnx.util.DNXObservableEngine
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.util.DNXObservableEngine

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.util.DNXInstancedObject
                   |
                   +----dnx.util.DNXObservableEngine

public class DNXObservableEngine
extends DNXInstancedObject
This class is used in conjunction with the DNXObservable interface. A mechanism has been added so that observers can specify a mask of the events they want delivered. This avoids the overhead of delivering some common events to observers unecessarily. An observable has the option to generate events that subclass DNXObserverEvent. These events have an event type -- each type should have only one bit set. An observer can choose to specify by means of a mask, which events should be delivered. If an observable generates events that do not subclass DNXObserverEvent, they are delivered to all observers. DNXObserverEvent subclasses should avoid intersecting masks between two event classes if an observable delivers both classes. However, nothing bad will happen if an intersection occurs.

Constructor Index

 o DNXObservableEngine(DNXObservable)

Method Index

 o addObserver(DNXObserver)
 o addObserver(DNXObserver, int)
 o countObservers()
 o deleteObserver(DNXObserver)
 o deleteObservers()
 o getObservable()
 o getObserverEventMask()
 o nosyncUpdateObservers(Object)
Similar to updateObservers(), but does NOT synchronize during the call to update().
 o updateObservers(Object)
Call the update() method of all registered observers, passing the specified ObserverEvent.

Constructors

 o DNXObservableEngine
  public DNXObservableEngine(DNXObservable observee)

Methods

 o getObservable
  public DNXObservable getObservable()
 o getObserverEventMask
  public int getObserverEventMask()
 o addObserver
  public synchronized void addObserver(DNXObserver o)
 o addObserver
  public synchronized void addObserver(DNXObserver o,
                                       int mask)
 o countObservers
  public synchronized int countObservers()
 o deleteObserver
  public synchronized void deleteObserver(DNXObserver o)
 o deleteObservers
  public synchronized void deleteObservers()
 o updateObservers
  public synchronized void updateObservers(Object arg)
Call the update() method of all registered observers, passing the specified ObserverEvent.
 o nosyncUpdateObservers
  public void nosyncUpdateObservers(Object arg)
Similar to updateObservers(), but does NOT synchronize during the call to update(). It is still allowable to add or delete observers during the update() method.

All Packages  Class Hierarchy  This Package  Previous  Next  Index