org.apache.tamaya.events.internal

## Class DefaultConfigEventSpi

- java.lang.Object
- - org.apache.tamaya.events.internal.DefaultConfigEventSpi

- All Implemented Interfaces:
    ConfigEventSpi

      public class DefaultConfigEventSpi
      extends Object
      implements ConfigEventSpi

  Default implementation of `DefaultConfigEventSpi` just forwarding all events synchronously to the listeners.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultConfigEventSpi()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> void` | `addListener(ConfigEventListener<T> l)` Add a listener for observing events.
    `<T> void` | `fireEvent(T event, Class<T> eventType)` Publishes an event to all interested listeners.
    `<T> void` | `removeListener(ConfigEventListener<T> l)` Removes a listener for observing events.

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

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

- - ### Constructor Detail

    - #### DefaultConfigEventSpi

          public DefaultConfigEventSpi()

      Constructor. Also loads all registered listeners.

  - ### Method Detail

    - #### addListener

          public <T> void addListener(ConfigEventListener<T> l)

      Description copied from interface: `ConfigEventSpi`
      Add a listener for observing events. References of this component to the listeners must be managed as weak references.
      Specified by:
        `addListener` in interface `ConfigEventSpi`
      Parameters:
        `l` - the listener not null.

    - #### removeListener

          public <T> void removeListener(ConfigEventListener<T> l)

      Description copied from interface: `ConfigEventSpi`
      Removes a listener for observing events.
      Specified by:
        `removeListener` in interface `ConfigEventSpi`
      Parameters:
        `l` - the listener not null.

    - #### fireEvent

          public <T> void fireEvent(T event,
                                    Class<T> eventType)

      Description copied from interface: `ConfigEventSpi`
      Publishes an event to all interested listeners.
      Specified by:
        `fireEvent` in interface `ConfigEventSpi`
      Parameters:
        `event` - the event, not null.
        `eventType` - the event type.

Copyright © 2014–2015 Apache Software Foundation. All rights reserved.