org.eclipse.handly.model.impl.support

## Class NotificationManager

- java.lang.Object
- - org.eclipse.handly.model.impl.support.NotificationManager

- All Implemented Interfaces:
    INotificationManager

      public class NotificationManager
      extends java.lang.Object
      implements INotificationManager

  Default implementation of `INotificationManager`. Thread-safe.

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotificationManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addElementChangeListener(IElementChangeListener listener)` Adds the given element change listener.
    `void` | `addElementChangeListener(IElementChangeListener listener, int eventMask)` Adds the given element change listener for the specified event types.
    `void` | `fireElementChangeEvent(IElementChangeEvent event)` Notifies registered listeners about the given event.
    `void` | `removeElementChangeListener(IElementChangeListener listener)` Removes the given element change listener.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NotificationManager

          public NotificationManager()

  - ### Method Detail

    - #### 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(IElementChangeListener, int)`, `removeElementChangeListener(IElementChangeListener)`

    - #### 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(IElementChangeListener)`

    - #### 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`)

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0