Class NotificationManager

java.lang.Object
org.eclipse.handly.model.impl.support.NotificationManager
All Implemented Interfaces:
INotificationManager

public class NotificationManager extends Object implements INotificationManager
Default implementation of INotificationManager. Thread-safe.

Clients can use this class as it stands or subclass it as circumstances warrant.

  • Constructor Details

    • NotificationManager

      public NotificationManager()
  • Method Details

    • addElementChangeListener

      public void addElementChangeListener(IElementChangeListener listener)
      Adds the given element change listener. Has no effect if an identical listener is already registered.
      Parameters:
      listener - the listener to add (not null)
      See Also:
    • addElementChangeListener

      public void addElementChangeListener(IElementChangeListener listener, int eventMask)
      Adds the given element change listener for the specified event types. Has no effect if an identical listener is already registered for these event types.

      After completion of this method, the given listener will be registered for exactly the specified event types. If it was previously registered for other event types, it will be de-registered for those event types.

      Parameters:
      listener - the listener to add (not null)
      eventMask - the bit-wise OR of all event types of interest to the listener
      See Also:
    • removeElementChangeListener

      public void removeElementChangeListener(IElementChangeListener listener)
      Removes the given element change listener. Has no effect if an identical listener is not registered.
      Parameters:
      listener - the listener to remove (not null)
    • fireElementChangeEvent

      public void fireElementChangeEvent(IElementChangeEvent event)
      Description copied from interface: INotificationManager
      Notifies registered listeners about the given event.
      Specified by:
      fireElementChangeEvent in interface INotificationManager
      Parameters:
      event - an element change event (not null)