Class RegionConfigurationSupport
- java.lang.Object
-
- org.apache.felix.scr.impl.manager.RegionConfigurationSupport
-
public abstract class RegionConfigurationSupport extends Object
-
-
Constructor Summary
Constructors Constructor Description RegionConfigurationSupport(ScrLogger logger, org.osgi.framework.ServiceReference<org.osgi.service.cm.ConfigurationAdmin> reference, org.osgi.framework.Bundle bundle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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 fromconfigurationEvent(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()
-
-
-
Constructor Detail
-
RegionConfigurationSupport
public RegionConfigurationSupport(ScrLogger logger, org.osgi.framework.ServiceReference<org.osgi.service.cm.ConfigurationAdmin> reference, org.osgi.framework.Bundle bundle)
- Parameters:
bundleContext
- of the ConfigurationAdmin we are trackingregistry
-
-
-
Method Detail
-
start
public void start()
-
getBundleId
public Long getBundleId()
-
reference
public boolean reference()
-
dereference
public boolean dereference()
-
configureComponentHolder
public boolean configureComponentHolder(ComponentHolder<?> holder)
The return value is only relevant for the call fromconfigurationEvent(ConfigurationEvent)
in the case of a deleted configuration which is not a factory configuration!
-
configurationEvent
public void configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
Called by the Configuration Admin service if a configuration is updated or removed.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.- Parameters:
event
- The configuration change event
-
getComponentHolders
protected abstract Collection<ComponentHolder<?>> getComponentHolders(TargetedPID pid)
-
findSingletonConfiguration
public 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. If no such configuration exists,null
is returned.- Parameters:
ca
- Configuration Admin servicepid
- Pid for desired configurationbundle
- bundle of the component we are configuring (used in targeted pids)- Returns:
- configuration with the specified Pid
-
-