Class IPublisher

Direct Known Subclasses:
ElementPainter, IAddon, IAddonManager, IFileSystem, IGui, ILogger, IMapNode, IMessageGenerator, StandardConfigHandler

public abstract class IPublisher
extends IPublisherGlobal
Publisher for observer design pattern. Extends IObserver to allow for publisher-observer classes.
  • Constructor Details

    • IPublisher

      public IPublisher()
  • Method Details

    • getObservers

      public Set<IObserver> getObservers()
    • setObservers

      public void setObservers​(Set<IObserver> observers)
    • publish

      public void publish​(IMessage message)
      Updates all subscribed observers.
      Parameters:
      message - Message.
    • addObserver

      public void addObserver​(IObserver observer)
      Adds a new observer.
      Parameters:
      observer -
    • removeObserver

      public void removeObserver​(IObserver observer)
      Removes an observer.
      Parameters:
      observer -