Class RegionConfigurationSupport


  • public abstract class RegionConfigurationSupport
    extends Object
    • 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 tracking
        registry -
    • 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 from configurationEvent(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
      • 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 service
        pid - Pid for desired configuration
        bundle - bundle of the component we are configuring (used in targeted pids)
        Returns:
        configuration with the specified Pid