Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EODelayedObserver


Inherits from: Object
Implements: EOObserving
Package: com.webobjects.eocontrol



Class Description


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. For an overview of the general change tracking mechanism, see "Tracking Enterprise Objects Changes" (page 22) in the introduction to the EOControl Framework.

EODelayedObserver is primarily used to implement the interface layer's associations and wouldn't ordinarily be used outside the scope of a Java Client or Application Kit application (not in a command line tool or WebObjects application, for example). See the EODelayedObserverQueue class specification for general information.

You would never create an instance of EODelayedObserver. Instead, you use subclasses-typically EOAssociations (EOInterface). For information on creating your own EODelayedObserver subclass, see "Creating a Subclass of EODelayedObserver" (page 67).




Constants


EODelayedObserver defines the following int constants to represent the priority of a notification in the queue:


ObserverPriorityImmediate ObserverPriorityFourth
ObserverPriorityFirst ObserverPriorityFifth
ObserverPrioritySecond ObserverPrioritySixth
ObserverPriorityThird ObserverPriorityLater

EODelayedObserver also defines the following int constant to identify the number of defined priorities (8 by default).



Interfaces Implemented


EOObserving
objectWillChange



Method Types


Change notification
subjectChanged
objectWillChange

Canceling change notification
discardPendingNotification

Getting the queue and priority
observerQueuepriority



Constructors



EODelayedObserver

public EODelayedObserver()

Description forthcoming.




Instance Methods



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 anObject)

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 super's implementation.

See Also: observerQueue, enqueueObserver (EODelayedObserverQueue), objectWillChange (EOObserving)



observerQueue

public EODelayedObserverQueue observerQueue()

Overridden by subclasses to return the receiver's designated EODelayedObserverQueue. EODelayedObserver's implementation returns the default EODelayedObserverQueue.

See Also: defaultObserverQueue (EODelayedObserverQueue)



priority

public int priority()

Overridden by subclasses to return the receiver's change notification priority, one of:

EODelayedObserver's implementation returns ObserverPriorityThird. See the EODelayedObserverQueue class specification for more information on priorities.



subjectChanged

public abstract void subjectChanged()

Implemented by subclasses to examine the receiver's observed objects and take whatever action is necessary. EODelayedObserver's implementation does nothing.



© 2001 Apple Computer, Inc. (Last Published April 19, 2001)


Table of Contents