WebObjects 5.2.3

com.webobjects.eocontrol
Class EODelayedObserver

java.lang.Object
  extended bycom.webobjects.eocontrol.EODelayedObserver
All Implemented Interfaces:
EOObserving
Direct Known Subclasses:
EOAssociation, EOObserverProxy

public abstract class EODelayedObserver
extends Object
implements EOObserving

The EODelayedObserver class is a part of EOControl's change tracking mechanism. It is an abstract superclass that defines the basic functionality for coalescing change notifications for multiple objects and postponing notification according to a prioritized queue.

You would never create an instance of EODelayedObserver. Instead, you would use subclasses, typically subclasses of EOAssociation (defined in EOInterface).

See EODelayedObserverConcepts for more information.

See Also:
EODelayedObserverQueue

Field Summary
static int ObserverNumberOfPriorities
          Constant to represent the number of priorities(8).
static int ObserverPriorityFifth
          Constant to represent the priority of a notification in the queue.
static int ObserverPriorityFirst
          Constant to represent the priority of a notification in the queue.
static int ObserverPriorityFourth
          Constant to represent the priority of a notification in the queue.
static int ObserverPriorityImmediate
          Constant to represent the priority of a notification in the queue.
static int ObserverPriorityLater
          Constant to represent the priority of a notification in the queue.
static int ObserverPrioritySecond
          Constant to represent the priority of a notification in the queue.
static int ObserverPrioritySixth
          Constant to represent the priority of a notification in the queue.
static int ObserverPriorityThird
          Constant to represent the priority of a notification in the queue.
 
Constructor Summary
EODelayedObserver()
           
 
Method Summary
 void discardPendingNotification()
          Sends a dequeueObserver message to the receiver's EODelayedObserverQueue to clear it from receiving a change notification.
 void objectWillChange(Object object)
          Implemented by EODelayedObserver to enqueue the receiver on its EODelayedObserverQueue.
 EODelayedObserverQueue observerQueue()
          Overridden by subclasses to determine the receiver's designated EODelayedObserverQueue.
 int priority()
          Overridden by subclasses to determine the receiver's change notification priority.
abstract  void subjectChanged()
          Implemented by subclasses to examine the receiver's observed objects and take whatever action is necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ObserverNumberOfPriorities

public static final int ObserverNumberOfPriorities
Constant to represent the number of priorities(8).

See Also:
Constant Field Values

ObserverPriorityFifth

public static final int ObserverPriorityFifth
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPriorityFirst

public static final int ObserverPriorityFirst
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPriorityFourth

public static final int ObserverPriorityFourth
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPriorityImmediate

public static final int ObserverPriorityImmediate
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPriorityLater

public static final int ObserverPriorityLater
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPrioritySecond

public static final int ObserverPrioritySecond
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPrioritySixth

public static final int ObserverPrioritySixth
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values

ObserverPriorityThird

public static final int ObserverPriorityThird
Constant to represent the priority of a notification in the queue.

See Also:
Constant Field Values
Constructor Detail

EODelayedObserver

public EODelayedObserver()
Method Detail

discardPendingNotification

public void discardPendingNotification()
Sends a dequeueObserver message to the receiver's EODelayedObserverQueue to clear it from receiving a change notification. A subclass of EODelayedObserver should invoke this method when its done observing changes.

See Also:
observerQueue()

objectWillChange

public void objectWillChange(Object object)
Implemented by EODelayedObserver to enqueue the receiver on its EODelayedObserverQueue. Subclasses shouldn't need to override this method; if they do, they must be sure to invoke the superclass's implementation.

Specified by:
objectWillChange in interface EOObserving
Parameters:
object - the input object
See Also:
observerQueue(), EODelayedObserverQueue.enqueueObserver(EODelayedObserver observer), EOObserving.objectWillChange(Object anObject)

observerQueue

public EODelayedObserverQueue observerQueue()
Overridden by subclasses to determine the receiver's designated EODelayedObserverQueue.

Returns:
the default EODelayedObserverQueue
See Also:
EODelayedObserverQueue.defaultObserverQueue()

priority

public int priority()
Overridden by subclasses to determine the receiver's change notification priority. The change notification is one of the following: The default implementation returns ObserverPriorityThird.

Returns:
ObserverPriorityThird
See Also:
ObserverPriorityImmediate, ObserverPriorityFirst, ObserverPrioritySecond, ObserverPriorityThird, ObserverPriorityFourth, ObserverPriorityFifth, ObserverPrioritySixth, ObserverPriorityLater, EODelayedObserverQueue, EODelayedObserver

subjectChanged

public abstract void subjectChanged()
Implemented by subclasses to examine the receiver's observed objects and take whatever action is necessary. The default implementation does nothing.


Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.