Class EventsHandler

java.lang.Object
dev.orne.config.impl.EventsHandler

@API(status=INTERNAL, since="1.0") public class EventsHandler extends Object
Utility class for watchable configuration events handling.
Since:
1.0
Version:
1.0, 2025-05
Author:
(w) Iker Hernaez
  • Constructor Details

    • EventsHandler

      public EventsHandler()
      Creates a new instance.
  • Method Details

    • getListeners

      protected List<WatchableConfig.Listener> getListeners()
      Returns the list of registered configuration changed event listeners.
      Returns:
      The list of registered configuration changed event listeners.
    • add

      public void add(WatchableConfig.Listener listener)
      Registers the specified configuration changed event listener.
      Parameters:
      listener - The configuration changed event listener.
    • remove

      public boolean remove(WatchableConfig.Listener listener)
      Unregisters the specified configuration changed event listener.
      Parameters:
      listener - The configuration changed event listener.
      Returns:
      If the specified listener was found and unregistered.
    • notify

      public void notify(MutableConfig instance, String... keys)
      Calls all registered configuration properties changed event callbacks.
      Parameters:
      instance - The modified configuration instance.
      keys - The changed properties.
    • notify

      public void notify(MutableConfig instance, Set<String> keys)
      Calls all registered configuration properties changed event callbacks.
      Parameters:
      instance - The modified configuration instance.
      keys - The changed properties.