Module hw06

Class SequentialDispatcher<TMsg>

java.lang.Object
provided.utils.dispatcher.impl.ADispatcher<TMsg>
provided.utils.dispatcher.impl.SequentialDispatcher<TMsg>
Type Parameters:
TMsg - The type of message being sent to the observers.
All Implemented Interfaces:
IDispatcher<TMsg>

public class SequentialDispatcher<TMsg> extends ADispatcher<TMsg>
A simple dispatcher that updates its observers sequentially on a single thread.
Author:
swong
  • Constructor Details

    • SequentialDispatcher

      public SequentialDispatcher()
  • Method Details

    • updateAll

      public void updateAll(TMsg msg)
      Description copied from interface: IDispatcher
      Send the given message to all the observers in the dispatcher
      Parameters:
      msg - The IMsg to send to all the observers