Package org.openhab.core.common.registry
Interface Provider<E>
- Type Parameters:
E
- type of the provided elements
- All Known Subinterfaces:
ItemChannelLinkProvider
,ItemProvider
,ManagedMetadataProvider
,ManagedProvider<E,
,K> MetadataProvider
,ModuleTypeProvider
,PersistenceServiceConfigurationProvider
,RuleProvider
,RuleTemplateProvider
,SemanticTagProvider
,TemplateProvider<E>
,ThingProvider
,TransformationProvider
,UIComponentProvider
,UserProvider
- All Known Implementing Classes:
AbstractManagedProvider
,AbstractProvider
,AnnotatedThingActionModuleTypeProvider
,DefaultAbstractManagedProvider
,DefaultSemanticTagProvider
,FileTransformationProvider
,ManagedItemChannelLinkProvider
,ManagedItemProvider
,ManagedPersistenceServiceConfigurationProvider
,ManagedRuleProvider
,ManagedSemanticTagProvider
,ManagedThingProvider
,ManagedTransformationProvider
,ScriptedRuleProvider
@NonNullByDefault
public interface Provider<@NonNull E>
A
Provider
provides elements of a determined type and the subinterfaces
are registered as OSGi services. Providers are tracked by Registry
services, which collect all elements from
different providers of the same
type.- Author:
- Dennis Nobel - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProviderChangeListener
(ProviderChangeListener<@NonNull E> listener) Adds aProviderChangeListener
which must be notified if there are changes concerning the elements provided by theProvider
.getAll()
Returns a collection of all elements.void
removeProviderChangeListener
(ProviderChangeListener<@NonNull E> listener) Removes aProviderChangeListener
.
-
Method Details
-
addProviderChangeListener
Adds aProviderChangeListener
which must be notified if there are changes concerning the elements provided by theProvider
.- Parameters:
listener
- the listener to be added
-
getAll
Collection<E> getAll()Returns a collection of all elements.- Returns:
- collection of all elements
-
removeProviderChangeListener
Removes aProviderChangeListener
.- Parameters:
listener
- the listener to be removed.
-