Package org.apache.felix.dm.runtime
Class DependencyManagerRuntime
java.lang.Object
org.apache.felix.dm.runtime.DependencyManagerRuntime
This class parses service descriptors generated by the annotation bnd processor.
The descriptors are located under META-INF/dependencymanager directory. Such files are actually
referenced by a specific "DependendencyManager-Component" manifest header.
- Author:
- Felix Project Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbundleStarted(org.osgi.framework.Bundle bundle) Load the DM descriptors from the started bundle.protected voidbundleStopped(org.osgi.framework.Bundle b) Unregisters all services for a stopping bundle.protected Object[]Return our Object Composition (the Activator will inject dependencies into it)protected voidstart()Starts our Service (at this point, we have been injected with our bundle context, as well as with our log service.protected voidstop()Stops our service.
-
Constructor Details
-
DependencyManagerRuntime
public DependencyManagerRuntime()Our constructor. We'll initialize here our DM component builders.
-
-
Method Details
-
getComposition
Return our Object Composition (the Activator will inject dependencies into it) -
start
protected void start()Starts our Service (at this point, we have been injected with our bundle context, as well as with our log service. We'll listen to bundle start/stop events (we implement the SynchronousBundleListener interface). -
stop
protected void stop()Stops our service. We'll stop all activated DependencyManager services. -
bundleStarted
protected void bundleStarted(org.osgi.framework.Bundle bundle) Load the DM descriptors from the started bundle. We also check possible fragments attached to the bundle, which might also contain some DM descriptors.- Parameters:
bundle- the started bundle which contains a DependencyManager-Component header
-
bundleStopped
protected void bundleStopped(org.osgi.framework.Bundle b) Unregisters all services for a stopping bundle.- Parameters:
b-
-