org.apache.tamaya.inject.internal

## Class WeakConfigListenerManager

- java.lang.Object
- - org.apache.tamaya.inject.internal.WeakConfigListenerManager

-     public final class WeakConfigListenerManager
      extends Object

  Simple listener container that only holds weak references on the listeners.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static WeakConfigListenerManager` | `of()`
    `void` | `publishChangeEvent(PropertyChangeSet change)` Publishes a change event to all consumers registered.
    `void` | `registerConsumer(Object instance, PropertyChangeSetListener listener)` Registers the given consumer for the instance.
    `String` | `toString()`
    `void` | `unregisterConsumer(Object instance)` Unregisters all consumers for the given instance.

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

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

- - ### Method Detail

    - #### of

          public static WeakConfigListenerManager of()

    - #### registerConsumer

          public void registerConsumer(Object instance,
                                       PropertyChangeSetListener listener)

      Registers the given consumer for the instance. If a consumer already exists for this instance the given consumer is appended.
      Parameters:
        `instance` - the instance, not null.
        `listener` - the consumer.

    - #### unregisterConsumer

          public void unregisterConsumer(Object instance)

      Unregisters all consumers for the given instance.
      Parameters:
        `instance` - the instance, not null.

    - #### publishChangeEvent

          public void publishChangeEvent(PropertyChangeSet change)

      Publishes a change event to all consumers registered.
      Parameters:
        `change` - the change event, not null.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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