Class ConfigSharingServiceImpl
java.lang.Object
org.apache.unomi.services.impl.configsharing.ConfigSharingServiceImpl
- All Implemented Interfaces:
EventListener
,ConfigSharingService
,org.osgi.framework.BundleListener
,org.osgi.framework.SynchronousBundleListener
public class ConfigSharingServiceImpl
extends Object
implements ConfigSharingService, org.osgi.framework.SynchronousBundleListener
An implementation of the ConfigSharingService that supports listeners that will be called when a property is added,
updated or removed. The properties are stored in a ConcurrentHashMap so access should be thread-safe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.unomi.api.services.ConfigSharingService
ConfigSharingService.ConfigChangeEvent, ConfigSharingService.ConfigChangeListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bundleChanged
(org.osgi.framework.BundleEvent bundleEvent) getProperty
(String name) boolean
hasProperty
(String name) void
removeProperty
(String name) void
setBundleContext
(org.osgi.framework.BundleContext bundleContext) void
setConfigProperties
(Map<String, Object> configProperties) setProperty
(String name, Object newValue)
-
Constructor Details
-
ConfigSharingServiceImpl
public ConfigSharingServiceImpl()
-
-
Method Details
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext) -
setConfigProperties
-
getProperty
- Specified by:
getProperty
in interfaceConfigSharingService
-
setProperty
- Specified by:
setProperty
in interfaceConfigSharingService
-
hasProperty
- Specified by:
hasProperty
in interfaceConfigSharingService
-
removeProperty
- Specified by:
removeProperty
in interfaceConfigSharingService
-
getPropertyNames
- Specified by:
getPropertyNames
in interfaceConfigSharingService
-
preDestroy
- Throws:
Exception
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent bundleEvent) - Specified by:
bundleChanged
in interfaceorg.osgi.framework.BundleListener
-