WebObjects 5.2.3

com.webobjects.eocontrol
Class EOObserverProxy

java.lang.Object
  extended bycom.webobjects.eocontrol.EODelayedObserver
      extended bycom.webobjects.eocontrol.EOObserverProxy
All Implemented Interfaces:
EOObserving

public class EOObserverProxy
extends EODelayedObserver

The EOObserverProxy class is a part of EOControl's change tracking mechanism. It provides a means for objects that can't inherit from EODelayedObserver to handle subjectChanged messages.

An EOObserverProxy has a target object on whose behalf it observes objects. EOObserverProxy overrides subjectChanged to send an action message to its target object, allowing the target to act as though it had received subjectChanged directly from an EODelayedObserverQueue.

See Also:
EOObserverCenter, EODelayedObserverQueue

Field Summary
 
Fields inherited from class com.webobjects.eocontrol.EODelayedObserver
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird
 
Constructor Summary
EOObserverProxy(Object target, NSSelector action, int priority)
          Creates a new EOObserverProxy to send action to target upon receiving a subjectChanged message.
 
Method Summary
 int priority()
          Returns the priority of the action.
 void subjectChanged()
          Implemented to react to a change in an observed object.
 
Methods inherited from class com.webobjects.eocontrol.EODelayedObserver
discardPendingNotification, objectWillChange, observerQueue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOObserverProxy

public EOObserverProxy(Object target,
                       NSSelector action,
                       int priority)
Creates a new EOObserverProxy to send action to target upon receiving a subjectChanged message. action should be a selector for a typical action method, taking one java.util.Object argument and returning void. priority indicates when the receiver is sent this message from EODelayedObserverQueue's notifyObserversUpToPriority method.

Parameters:
target - the target object on whose behalf EOObserverProxy observes objects
action - the selector (a typical action method)
priority - the priority of the action
Method Detail

priority

public int priority()
Returns the priority of the action.

Overrides:
priority in class EODelayedObserver
Returns:
the priority of the action
See Also:
EODelayedObserver.ObserverPriorityImmediate, EODelayedObserver.ObserverPriorityFirst, EODelayedObserver.ObserverPrioritySecond, EODelayedObserver.ObserverPriorityThird, EODelayedObserver.ObserverPriorityFourth, EODelayedObserver.ObserverPriorityFifth, EODelayedObserver.ObserverPrioritySixth, EODelayedObserver.ObserverPriorityLater, EODelayedObserverQueue, EODelayedObserver

subjectChanged

public void subjectChanged()
Implemented to react to a change in an observed object. Sends the action to the target registered with the receiver.

Specified by:
subjectChanged in class EODelayedObserver

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

Copyright © 2004 Apple Computer, Inc.