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 TypeMethodDescriptionvoidbundleChanged(org.osgi.framework.BundleEvent bundleEvent) getProperty(String name) booleanhasProperty(String name) voidremoveProperty(String name) voidsetBundleContext(org.osgi.framework.BundleContext bundleContext) voidsetConfigProperties(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:
getPropertyin interfaceConfigSharingService
-
setProperty
- Specified by:
setPropertyin interfaceConfigSharingService
-
hasProperty
- Specified by:
hasPropertyin interfaceConfigSharingService
-
removeProperty
- Specified by:
removePropertyin interfaceConfigSharingService
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceConfigSharingService
-
preDestroy
- Throws:
Exception
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent bundleEvent) - Specified by:
bundleChangedin interfaceorg.osgi.framework.BundleListener
-