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

      @NotNull protected @NotNull List<@NotNull 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(@NotNull @NotNull WatchableConfig.Listener listener)
      Registers the specified configuration changed event listener.
      Parameters:
      listener - The configuration changed event listener.
    • remove

      public boolean remove(@NotNull @NotNull 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(@NotNull @NotNull MutableConfig instance, @NotNull @NotNull String... keys)
      Calls all registered configuration properties changed event callbacks.
      Parameters:
      instance - The modified configuration instance.
      keys - The changed properties.
    • notify

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