Class DependencyManagerRuntime

java.lang.Object
org.apache.felix.dm.runtime.DependencyManagerRuntime

public class DependencyManagerRuntime extends Object
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
    Constructor
    Description
    Our constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    bundleStarted(org.osgi.framework.Bundle bundle)
    Load the DM descriptors from the started bundle.
    protected void
    bundleStopped(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 void
    Starts our Service (at this point, we have been injected with our bundle context, as well as with our log service.
    protected void
    Stops our service.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DependencyManagerRuntime

      public DependencyManagerRuntime()
      Our constructor. We'll initialize here our DM component builders.
  • Method Details

    • getComposition

      protected Object[] 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 -