Class RegionConfigurationSupport
java.lang.Object
org.apache.felix.scr.impl.manager.RegionConfigurationSupport
-
Constructor Summary
ConstructorsConstructorDescriptionRegionConfigurationSupport
(ScrLogger logger, org.osgi.framework.ServiceReference<org.osgi.service.cm.ConfigurationAdmin> reference, org.osgi.framework.Bundle bundle) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
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.protected abstract Collection<ComponentHolder<?>>
boolean
void
start()
-
Constructor Details
-
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 Details
-
start
public void start() -
getBundleId
-
reference
public boolean reference() -
dereference
public boolean dereference() -
configureComponentHolder
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
-
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
-