java.lang.Object
dev.orne.config.impl.EventsHandler
Utility class for watchable configuration events handling.
- Since:
- 1.0
- Version:
- 1.0, 2025-05
- Author:
- (w) Iker Hernaez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(@NotNull WatchableConfig.Listener listener) Registers the specified configuration changed event listener.protected @NotNull List<@NotNull WatchableConfig.Listener>Returns the list of registered configuration changed event listeners.voidnotify(@NotNull MutableConfig instance, @NotNull String... keys) Calls all registered configuration properties changed event callbacks.voidnotify(@NotNull MutableConfig instance, @NotNull Set<String> keys) Calls all registered configuration properties changed event callbacks.booleanremove(@NotNull WatchableConfig.Listener listener) Unregisters the specified configuration changed event listener.
-
Constructor Details
-
EventsHandler
public EventsHandler()Creates a new instance.
-
-
Method Details
-
getListeners
Returns the list of registered configuration changed event listeners.- Returns:
- The list of registered configuration changed event listeners.
-
add
Registers the specified configuration changed event listener.- Parameters:
listener- The configuration changed event listener.
-
remove
Unregisters the specified configuration changed event listener.- Parameters:
listener- The configuration changed event listener.- Returns:
- If the specified listener was found and unregistered.
-
notify
Calls all registered configuration properties changed event callbacks.- Parameters:
instance- The modified configuration instance.keys- The changed properties.
-
notify
Calls all registered configuration properties changed event callbacks.- Parameters:
instance- The modified configuration instance.keys- The changed properties.
-