Package org.confng.reload
Interface ConfigChangeListener
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ConfigChangeListener
Listener interface for receiving notifications when configuration values change.Implement this interface to be notified when configuration files are reloaded and values have changed. This is useful for long-running applications that need to react to configuration changes without restarting.
Example Usage:
{@code ConfNG.addChangeListener(new ConfigChangeListener() {- Since:
- 1.1.0
- Author:
- Bharat Kumar Malviya, GitHub: github.com/imBharatMalviya
- See Also:
ConfigChangeListener.ConfigChangeEvent,ConfNG.addChangeListener(ConfigChangeListener)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classConfigChangeListener.ConfigChangeEventEvent object containing details about configuration changes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonConfigChange(ConfigChangeListener.ConfigChangeEvent event)Called when configuration values have changed.
-
-
-
Method Detail
-
onConfigChange
void onConfigChange(ConfigChangeListener.ConfigChangeEvent event)
Called when configuration values have changed.- Parameters:
event- the change event containing details about what changed
-
-