- All Superinterfaces:
Config,MutableConfig
- All Known Subinterfaces:
FileWatchableConfig,PreferencesMutableConfig
- All Known Implementing Classes:
AbstractWatchableConfig,CommonsMutableConfigImpl,DelegatedWatchableConfig,JsonMutableConfigImpl,PreferencesMutableConfigImpl,PropertiesMutableConfigImpl,XmlMutableConfigImpl,YamlMutableConfigImpl
Watchable mutable configuration properties provider.
- Since:
- 1.0
- Version:
- 1.0, 2025-04
- Author:
- (w) Iker Hernaez
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMutable configuration changes listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(@NotNull WatchableConfig.Listener listener) Registers the specified configuration change events listener.voidremoveListener(@NotNull WatchableConfig.Listener listener) Unregisters the specified configuration change events listener.default @NotNull WatchableConfigCreates a subset configuration containing only the properties with the specified prefix.Methods inherited from interface dev.orne.config.Config
as, contains, get, get, get, getBoolean, getBoolean, getBoolean, getInteger, getInteger, getInteger, getKeys, getKeys, getKeys, getLong, getLong, getLong, getParent, getUndecored, isEmpty
-
Method Details
-
addListener
Registers the specified configuration change events listener.- Parameters:
listener- The listener to be called on configuration changes.- Throws:
IllegalStateException- If the configuration type does not support event listeners.
-
removeListener
Unregisters the specified configuration change events listener.- Parameters:
listener- The listener to previously registered.
-
subset
Creates a subset configuration containing only the properties with the specified prefix.- Specified by:
subsetin interfaceConfig- Specified by:
subsetin interfaceMutableConfig- Parameters:
prefix- The prefix for configuration keys.- Returns:
- The subset configuration.
-