Observer
Implementation
Several issues related to the implementation of the dependency mechanism are discussed in this section.
-
-
Observing more than one subject.
It might make sense in some situations for an observer to depend on
more than one subject. For example, a spreadsheet may depend on more
than one data source. It's necessary to extend the Update interface
in such cases to let the observer know which subject is sending
the notification. The subject can simply pass itself as a parameter
in the Update operation, thereby letting the observer know which
subject to examine.