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 TypeMethodDescriptionvoidconfigurationEvent(org.osgi.service.cm.ConfigurationEvent event) Called by the Configuration Admin service if a configuration is updated or removed.booleanconfigureComponentHolder(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!booleanorg.osgi.service.cm.ConfigurationfindSingletonConfiguration(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<?>> booleanvoidstart()
-
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
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.invalid reference
ComponentRegistry#serviceChanged(org.osgi.framework.ServiceEvent)- 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,nullis 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
-