Package org.apache.felix.cm.impl
Class Activator
java.lang.Object
org.apache.felix.cm.impl.Activator
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
Activator for the configuration admin implementation.
When the bundle is started this activator:
- Sets up the logger
Log. - A
FilePersistenceManagerinstance is registered as a defaultPersistenceManager. - Creates and sets up the
ConfigurationManager.
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe name of the framework context property defining the location for the configuration files (value is "felix.cm.dir").static final StringThe name of the framework context property defining the required configuration plugins.private static final StringThe name of the framework context property defining the persistence manager to be used.private org.osgi.framework.ServiceRegistration<PersistenceManager> private org.osgi.framework.ServiceRegistration<PersistenceManager> private DependencyTracker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String[]getConfiguredConfigurationPlugins(org.osgi.framework.BundleContext bundleContext) private StringgetConfiguredPersistenceManager(org.osgi.framework.BundleContext bundleContext) static StringgetLocation(org.osgi.framework.Bundle bundle) private org.osgi.framework.ServiceFactory<PersistenceManager> registerFilePersistenceManager(org.osgi.framework.BundleContext bundleContext) private voidregisterMemoryPersistenceManager(org.osgi.framework.BundleContext bundleContext) voidstart(org.osgi.framework.BundleContext bundleContext) voidstop(org.osgi.framework.BundleContext bundleContext) private voidprivate void
-
Field Details
-
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
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
The name of the framework context property defining the required configuration plugins. If this property is specified it refers to theRequiredConfigurationPluginTracker.PROPERTY_NAMEproperty of a configuration plugin and that configuration plugin must be registered and available.- See Also:
-
tracker
-
filepmRegistration
-
memorypmRegistration
-
-
Constructor Details
-
Activator
public Activator()
-
-
Method Details
-
start
public void start(org.osgi.framework.BundleContext bundleContext) throws org.osgi.framework.BundleException - Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
org.osgi.framework.BundleException
-
getConfiguredPersistenceManager
-
getConfiguredConfigurationPlugins
-
stop
public void stop(org.osgi.framework.BundleContext bundleContext) - Specified by:
stopin interfaceorg.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
-