Observer

Purpose

Structure

 

Interaction

  1. ConcreteSubject notifies its observers whenever a change occurs that could make its observers' state inconsistent with its own.
  2. After being informed of a change in the concrete subject, a ConcreteObserver object may query the subject for information.
  3. ConcreteObserver uses this information to reconcile its state with that of the subject.

Applications

Consequences