public abstract class RegionConfigurationSupport extends Object
Constructor and Description |
---|
RegionConfigurationSupport(ScrLogger logger,
org.osgi.framework.ServiceReference<org.osgi.service.cm.ConfigurationAdmin> reference,
org.osgi.framework.Bundle bundle) |
Modifier and Type | Method and Description |
---|---|
void |
configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
Called by the Configuration Admin service if a configuration is updated
or removed.
|
boolean |
configureComponentHolder(ComponentHolder<?> holder)
The return value is only relevant for the call from
configurationEvent(ConfigurationEvent)
in the case of a deleted configuration which is not a factory configuration! |
boolean |
dereference() |
org.osgi.service.cm.Configuration |
findSingletonConfiguration(org.osgi.service.cm.ConfigurationAdmin ca,
String pid,
org.osgi.framework.Bundle bundle)
Returns the configuration whose PID equals the given pid.
|
Long |
getBundleId() |
protected abstract Collection<ComponentHolder<?>> |
getComponentHolders(TargetedPID pid) |
boolean |
reference() |
void |
start() |
public RegionConfigurationSupport(ScrLogger logger, org.osgi.framework.ServiceReference<org.osgi.service.cm.ConfigurationAdmin> reference, org.osgi.framework.Bundle bundle)
bundleContext
- of the ConfigurationAdmin we are trackingregistry
- public void start()
public Long getBundleId()
public boolean reference()
public boolean dereference()
public boolean configureComponentHolder(ComponentHolder<?> holder)
configurationEvent(ConfigurationEvent)
in the case of a deleted configuration which is not a factory configuration!public void configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
This method is really only called upon configuration changes; it is not
called for existing configurations upon startup of the Configuration
Admin service. To bridge this gap, the
ComponentRegistry#serviceChanged(org.osgi.framework.ServiceEvent)
method called when the
Configuration Admin service is registered calls #configureComponentHolders which calls this method for all
existing configurations to be able to forward existing configurations to
components.
event
- The configuration change eventprotected abstract Collection<ComponentHolder<?>> getComponentHolders(TargetedPID pid)
public org.osgi.service.cm.Configuration findSingletonConfiguration(org.osgi.service.cm.ConfigurationAdmin ca, String pid, org.osgi.framework.Bundle bundle)
null
is returned.ca
- Configuration Admin servicepid
- Pid for desired configurationbundle
- bundle of the component we are configuring (used in targeted pids)Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.