Package org.openhab.core.common.registry
Class RegistryChangedRunnableListener<E>
java.lang.Object
org.openhab.core.common.registry.RegistryChangedRunnableListener<E>
- Type Parameters:
E
- type of the element in the registry
- All Implemented Interfaces:
RegistryChangeListener<E>
@NonNullByDefault
public class RegistryChangedRunnableListener<E>
extends Object
implements RegistryChangeListener<E>
RegistryChangedRunnableListener
can be added to Registry
services, to execute a given
Runnable
on all types of changes.- Author:
- Florian Hotze - Initial contribution
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notifies the listener that a single element has been added.void
Notifies the listener that a single element has been removed.void
Notifies the listener that a single element has been updated.
-
Constructor Details
-
RegistryChangedRunnableListener
-
-
Method Details
-
added
Description copied from interface:RegistryChangeListener
Notifies the listener that a single element has been added.- Specified by:
added
in interfaceRegistryChangeListener<E>
- Parameters:
element
- the element that has been added
-
removed
Description copied from interface:RegistryChangeListener
Notifies the listener that a single element has been removed.- Specified by:
removed
in interfaceRegistryChangeListener<E>
- Parameters:
element
- the element that has been removed
-
updated
Description copied from interface:RegistryChangeListener
Notifies the listener that a single element has been updated.- Specified by:
updated
in interfaceRegistryChangeListener<E>
- Parameters:
oldElement
- the element that has been updatednewElement
- the new element
-