Module hw06

Interface IObserver<TMsg>

Type Parameters:
TMsg - The type of message this observer is capable of receiving and processing.

public interface IObserver<TMsg>
Top-level abstraction of the Observer in the Observer-Observable Design Pattern. An IObserver receives TMsg-type messages from its associated, matched Observable, an IDispatcher<TMsg>.
Author:
swong
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    update​(IDispatcher<TMsg> disp, TMsg msg)
    The update method called by the observer's dispatcher (observable)
  • Method Details

    • update

      void update(IDispatcher<TMsg> disp, TMsg msg)
      The update method called by the observer's dispatcher (observable)
      Parameters:
      disp - The dispatcher that called this method
      msg - The message being distributed to all the observers.