|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.cm.impl.ConfigurationManager
public class ConfigurationManager
The ConfigurationManager
is the central class in this
implementation of the Configuration Admin Service Specification. As such it
has the following tasks:
BundleActivator
which is called when the bundle
is started and stopped.
BundleListener
which gets informed when the
states of bundles change. Mostly this is needed to unbind any bound
configuration in case a bundle is uninstalled.
ServiceListener
which gets informed when
ManagedService
and ManagedServiceFactory
services are registered and unregistered. This is used to provide
configuration to these services. As a service listener it also listens for
PersistenceManager
instances being registered to support different
configuration persistence layers.
ConfigurationAdminFactory
instance is registered as the
ConfigurationAdmin
service.
FilePersistenceManager
instance is registered as a default
PersistenceManager
.
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 | |
---|---|
static String |
CM_CONFIG_DIR
The name of the bundle context property defining the location for the configuration files (value is "felix.cm.dir"). |
static String |
CM_LOG_LEVEL
The name of the bundle context property defining the maximum log level (value is "felix.cm.loglevel"). |
Constructor Summary | |
---|---|
ConfigurationManager()
|
Method Summary | |
---|---|
void |
bundleChanged(BundleEvent event)
Receives notification that a bundle has had a lifecycle change. |
void |
start(BundleContext bundleContext)
Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. |
void |
stop(BundleContext bundleContext)
Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CM_CONFIG_DIR
start(BundleContext)
,
Constant Field Valuespublic static final String CM_LOG_LEVEL
This value of this property is expected to be an integer number corresponding to the log level values of the OSGi LogService. That is 1 for errors, 2 for warnings, 3 for informational messages and 4 for debug messages. The default value is 2, such that only warnings and errors are logged in the absence of a LogService.
Constructor Detail |
---|
public ConfigurationManager()
Method Detail |
---|
public void start(BundleContext bundleContext)
BundleActivator
This method must complete and return to its caller in a timely manner.
start
in interface BundleActivator
bundleContext
- The execution context of the bundle being started.public void stop(BundleContext bundleContext)
BundleActivator
BundleActivator.start
method started. There should be no active threads that were started by
this bundle when this bundle returns. A stopped bundle must not call any
Framework objects.
This method must complete and return to its caller in a timely manner.
stop
in interface BundleActivator
bundleContext
- The execution context of the bundle being stopped.public void bundleChanged(BundleEvent event)
BundleListener
bundleChanged
in interface BundleListener
event
- The BundleEvent
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |