java.lang.Object
dev.orne.config.impl.AbstractConfig
dev.orne.config.impl.AbstractMutableConfig
dev.orne.config.impl.AbstractWatchableConfig
- All Implemented Interfaces:
Config,MutableConfig,WatchableConfig
- Direct Known Subclasses:
CommonsMutableConfigImpl,JsonMutableConfigImpl,PreferencesMutableConfigImpl,PropertiesMutableConfigImpl,XmlMutableConfigImpl
@API(status=INTERNAL,
since="1.0")
public abstract class AbstractWatchableConfig
extends AbstractMutableConfig
implements WatchableConfig
Base abstract implementation of watchable mutable configuration properties
provider.
- Since:
- 1.0
- Version:
- 1.0, 2025-04
- Author:
- (w) Iker Hernaez
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.orne.config.WatchableConfig
WatchableConfig.Listener -
Field Summary
Fields inherited from class dev.orne.config.impl.AbstractConfig
KEY_BLANK_ERR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWatchableConfig(@NotNull ConfigOptions options, @NotNull MutableConfigOptions mutableOptions) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(@NotNull WatchableConfig.Listener listener) Registers the specified configuration change events listener.protected EventsHandlerReturns the configuration change events handler, if supported by delegated configuration.protected voidnotifyLocalChanges(@NotNull String... keys) Notifies configuration properties changed through this instance to all registered listeners.protected voidnotifyParentChanges(@NotNull Set<String> keys) Notifies configuration properties changed through parent configuration to all registered listeners.voidRemoves the specified configuration properties.voidremoveListener(@NotNull WatchableConfig.Listener listener) Unregisters the specified configuration change events listener.voidSets the value of the specified configuration property.Methods inherited from class dev.orne.config.impl.AbstractMutableConfig
getEncoder, removeInt, setIntMethods inherited from class dev.orne.config.impl.AbstractConfig
contains, containsInt, get, getDecoder, getDecorator, getInt, getKeys, getKeysInt, getParent, getResolver, getUndecored, isEmpty, isEmptyInt, isOverrideParentPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, isEmptyMethods inherited from interface dev.orne.config.MutableConfig
set, set, setMethods inherited from interface dev.orne.config.WatchableConfig
subset
-
Constructor Details
-
AbstractWatchableConfig
protected AbstractWatchableConfig(@NotNull @NotNull ConfigOptions options, @NotNull @NotNull MutableConfigOptions mutableOptions) Creates a new instance.- Parameters:
options- The configuration builder options.mutableOptions- The mutable configuration builder options.
-
-
Method Details
-
getEvents
Returns the configuration change events handler, if supported by delegated configuration.- Returns:
- The configuration change events handler.
-
set
Sets the value of the specified configuration property.- Specified by:
setin interfaceMutableConfig- Overrides:
setin classAbstractMutableConfig- Parameters:
key- The configuration property.value- The value to set
-
remove
Removes the specified configuration properties.- Specified by:
removein interfaceMutableConfig- Overrides:
removein classAbstractMutableConfig- Parameters:
keys- The configuration properties.
-
addListener
Registers the specified configuration change events listener.- Specified by:
addListenerin interfaceWatchableConfig- Parameters:
listener- The listener to be called on configuration changes.
-
removeListener
Unregisters the specified configuration change events listener.- Specified by:
removeListenerin interfaceWatchableConfig- Parameters:
listener- The listener to previously registered.
-
notifyLocalChanges
Notifies configuration properties changed through this instance to all registered listeners.- Parameters:
keys- The changed local properties.
-
notifyParentChanges
Notifies configuration properties changed through parent configuration to all registered listeners.- Parameters:
keys- The changed parent properties.
-