WebObjects 5.2

com.webobjects.eocontrol
Class EOObserverProxy

java.lang.Object
  |
  +--com.webobjects.eocontrol.EODelayedObserver
        |
        +--com.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

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

subjectChanged

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

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.