Class Activator

java.lang.Object
org.apache.felix.dm.compat.DependencyActivatorBaseCompat
org.apache.felix.dm.DependencyActivatorBase
org.apache.felix.dm.runtime.Activator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class Activator extends org.apache.felix.dm.DependencyActivatorBase
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    destroy(org.osgi.framework.BundleContext context, org.apache.felix.dm.DependencyManager dm)
    Our bundle is stopping: shutdown our Dependency Manager Runtime service.
    void
    init(org.osgi.framework.BundleContext context, org.apache.felix.dm.DependencyManager dm)
    Initialize our DependencyManager Runtime service.

    Methods inherited from class org.apache.felix.dm.DependencyActivatorBase

    createAdapterComponent, createAspectComponent, createBundleComponent, createBundleDependency, createComponent, createConfigurationDependency, createFactoryComponent, createPropertyMetaData, createResourceComponent, createResourceDependency, createServiceDependency, createTemporalServiceDependency, getBundleContext, getDependencyManager, getLogger, start, stop

    Methods inherited from class org.apache.felix.dm.compat.DependencyActivatorBaseCompat

    createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAspectService, createAspectService, createAspectService, createAspectService, createAspectService, createBundleAdapterService, createBundleAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createResourceAdapter, createResourceAdapter, createResourceAdapter, createResourceAdapter, setDependencyManager

    Methods inherited from class java.lang.Object

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

    • Activator

      public Activator()
  • Method Details

    • init

      public void init(org.osgi.framework.BundleContext context, org.apache.felix.dm.DependencyManager dm) throws Exception
      Initialize our DependencyManager Runtime service. We depend on the OSGi LogService, and we track all started bundles which do have a "DependencyManager-Component" Manifest header. If the "dm.runtime.log=true" or "dm.runtime.packageAdmin=true" parameter is configured in the Felix config.properties then we'll use a required/temporal service dependency over the respective service. These temporal dependencies avoid us to be restarted if the respective service is temporarily unavailable (that is: when the service is updating). if the "dm.runtime.log" or "dm.runtime.packageAdmin" is not configured or it it is set to false, then we'll use an optional dependency over the respective service, in order to use a NullObject in case the service is not available.
      Specified by:
      init in class org.apache.felix.dm.DependencyActivatorBase
      Throws:
      Exception
    • destroy

      public void destroy(org.osgi.framework.BundleContext context, org.apache.felix.dm.DependencyManager dm) throws Exception
      Our bundle is stopping: shutdown our Dependency Manager Runtime service.
      Overrides:
      destroy in class org.apache.felix.dm.DependencyActivatorBase
      Throws:
      Exception