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 Constructor Description ConfigSharingServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbundleChanged(org.osgi.framework.BundleEvent bundleEvent)ObjectgetProperty(String name)Set<String>getPropertyNames()booleanhasProperty(String name)voidpreDestroy()ObjectremoveProperty(String name)voidsetBundleContext(org.osgi.framework.BundleContext bundleContext)voidsetConfigProperties(Map<String,Object> configProperties)ObjectsetProperty(String name, Object newValue)
-
-
-
Method Detail
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
getProperty
public Object getProperty(String name)
- Specified by:
getPropertyin interfaceConfigSharingService
-
setProperty
public Object setProperty(String name, Object newValue)
- Specified by:
setPropertyin interfaceConfigSharingService
-
hasProperty
public boolean hasProperty(String name)
- Specified by:
hasPropertyin interfaceConfigSharingService
-
removeProperty
public Object removeProperty(String name)
- Specified by:
removePropertyin interfaceConfigSharingService
-
getPropertyNames
public Set<String> getPropertyNames()
- Specified by:
getPropertyNamesin interfaceConfigSharingService
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent bundleEvent)
- Specified by:
bundleChangedin interfaceorg.osgi.framework.BundleListener
-
-