public interface ConfigurationObserver
ConfigurationObserver
observes changes made to a Configuration
instance.Modifier and Type | Method and Description |
---|---|
default void |
added(Configuration configuration)
Called by the
Configuration that this ConfigurationObserver instance was just added to. |
void |
objectSet(Configuration configuration,
java.lang.String id,
java.util.Optional<?> oldObject,
java.util.Optional<?> newObject)
Called by a
Configuration when a new Object has been set for a given ID. |
default void |
removed(Configuration configuration)
Called by the
Configuration that this ConfigurationObserver instance was just removed from. |
void objectSet(Configuration configuration, java.lang.String id, java.util.Optional<?> oldObject, java.util.Optional<?> newObject)
Configuration
when a new Object
has been set for a given ID.
If either configuration
, id
, oldObject
or newObject
are null
, a NullPointerException
may be thrown. But no guarantees can be made for all implementations.
configuration
- the Configuration
that called this methodid
- the ID of the Object
oldObject
- an Optional
that contains the old configuration value, if it was setnewObject
- an Optional
that contains the new configuration value, if it is setjava.lang.NullPointerException
- thrown if, and only if, either configuration
, id
, oldObject
or newObject
are null
default void added(Configuration configuration)
Configuration
that this ConfigurationObserver
instance was just added to.
If configuration
is null
, a NullPointerException
may be thrown. But no guarantees can be made for all implementations. However, the default implementation will throw a
NullPointerException
if configuration
is null
This method does nothing by default.
configuration
- the Configuration
that called this methodjava.lang.NullPointerException
- thrown if, and only if, configuration
is null
default void removed(Configuration configuration)
Configuration
that this ConfigurationObserver
instance was just removed from.
If configuration
is null
, a NullPointerException
may be thrown. But no guarantees can be made for all implementations. However, the default implementation will throw a
NullPointerException
if configuration
is null
This method does nothing by default.
configuration
- the Configuration
that called this methodjava.lang.NullPointerException
- thrown if, and only if, configuration
is null