Class Activator

java.lang.Object
org.apache.felix.cm.impl.Activator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class Activator extends Object implements org.osgi.framework.BundleActivator
Activator for the configuration admin implementation. When the bundle is started this activator:

The default FilePersistenceManager is configured with a configuration location taken from the felix.cm.dir framework property. If this property is not set the config directory in the current working directory as specified in the user.dir system property is used.

  • Field Details

    • CM_CONFIG_DIR

      private static final String CM_CONFIG_DIR
      The name of the framework context property defining the location for the configuration files (value is "felix.cm.dir").
      See Also:
    • CM_CONFIG_PM

      private static final String CM_CONFIG_PM
      The name of the framework context property defining the persistence manager to be used. If this property is not set or empty, the built-in persistence manager (named file) is used. If it is specified it refers to the name property of a persistence manager and that persistence manager needs to be registered.
      See Also:
    • CM_CONFIG_PLUGINS

      public static final String CM_CONFIG_PLUGINS
      The name of the framework context property defining the required configuration plugins. If this property is specified it refers to the RequiredConfigurationPluginTracker.PROPERTY_NAME property of a configuration plugin and that configuration plugin must be registered and available.
      See Also:
    • tracker

      private volatile DependencyTracker tracker
    • filepmRegistration

      private volatile org.osgi.framework.ServiceRegistration<PersistenceManager> filepmRegistration
    • memorypmRegistration

      private volatile org.osgi.framework.ServiceRegistration<PersistenceManager> memorypmRegistration
  • Constructor Details

    • Activator

      public Activator()
  • Method Details

    • start

      public void start(org.osgi.framework.BundleContext bundleContext) throws org.osgi.framework.BundleException
      Specified by:
      start in interface org.osgi.framework.BundleActivator
      Throws:
      org.osgi.framework.BundleException
    • getConfiguredPersistenceManager

      private String getConfiguredPersistenceManager(org.osgi.framework.BundleContext bundleContext)
    • getConfiguredConfigurationPlugins

      private String[] getConfiguredConfigurationPlugins(org.osgi.framework.BundleContext bundleContext)
    • stop

      public void stop(org.osgi.framework.BundleContext bundleContext)
      Specified by:
      stop in interface org.osgi.framework.BundleActivator
    • registerFilePersistenceManager

      private org.osgi.framework.ServiceFactory<PersistenceManager> registerFilePersistenceManager(org.osgi.framework.BundleContext bundleContext)
    • registerMemoryPersistenceManager

      private void registerMemoryPersistenceManager(org.osgi.framework.BundleContext bundleContext)
    • unregisterFilePersistenceManager

      private void unregisterFilePersistenceManager()
    • unregisterMemoryPersistenceManager

      private void unregisterMemoryPersistenceManager()
    • getLocation

      public static String getLocation(org.osgi.framework.Bundle bundle)