samples.dependonservice
Class Activator
java.lang.Object
org.apache.felix.dm.DependencyActivatorBase
samples.dependonservice.Activator
- All Implemented Interfaces:
- BundleActivator
public class Activator
- extends DependencyActivatorBase
Methods inherited from class org.apache.felix.dm.DependencyActivatorBase |
createAdapterService, createAspectService, createBundleAdapterService, createBundleDependency, createComponent, createConfigurationDependency, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createPropertyMetaData, createResourceAdapter, createResourceAdapter, createResourceDependency, createServiceDependency, createTemporalServiceDependency, getBundleContext, getDependencyManager, getLogger, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Activator
public Activator()
init
public void init(BundleContext context,
DependencyManager manager)
throws Exception
- Description copied from class:
DependencyActivatorBase
- Initialize the dependency manager. Here you can add all components and their dependencies.
If something goes wrong and you do not want your bundle to be started, you can throw an
exception. This exception will be passed on to the
start()
method of the
bundle activator, causing the bundle not to start.
- Specified by:
init
in class DependencyActivatorBase
- Parameters:
context
- the bundle contextmanager
- the dependency manager
- Throws:
Exception
- if the initialization fails
destroy
public void destroy(BundleContext context,
DependencyManager manager)
throws Exception
- Description copied from class:
DependencyActivatorBase
- Destroy the dependency manager. Here you can remove all components and their dependencies.
Actually, the base class will clean up your dependencies anyway, so most of the time you
don't need to do anything here.
If something goes wrong and you do not want your bundle to be stopped, you can throw an
exception. This exception will be passed on to the stop()
method of the
bundle activator, causing the bundle not to stop.
- Specified by:
destroy
in class DependencyActivatorBase
- Parameters:
context
- the bundle contextmanager
- the dependency manager
- Throws:
Exception
- if the destruction fails
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.