Class IPublisherGlobal

java.lang.Object
rs.edu.raf.dsw.rudok.app.observer.IObserver
rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
Direct Known Subclasses:
IPublisher

public class IPublisherGlobal
extends IObserver
For classes that want to listen to all instances of IPublisher for a specific type of IMessage.
  • Constructor Details

    • IPublisherGlobal

      public IPublisherGlobal()
  • Method Details

    • getObserversGlobal

      public static Set<IObserver> getObserversGlobal​(Class type)
      Returns the global observers for the given message type.
      Parameters:
      type - IMessage class type.
      Returns:
      Set of IObservers, if any.
    • addObserverGlobal

      public static void addObserverGlobal​(Class type, IObserver observer)
      Adds a new global observer.
      Parameters:
      observer - IObserver
    • removeObserverGlobal

      public static void removeObserverGlobal​(Class type, IObserver observer)
      Removes a global observer.
      Parameters:
      observer - IObserver