|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.dependencymanager.DependencyActivatorBase
public abstract class DependencyActivatorBase
Base bundle activator class. Subclass this activator if you want to use dependency
management in your bundle. There are two methods you should implement:
init()
and destroy()
. Both methods take two arguments,
the bundle context and the dependency manager. The dependency manager can be used
to define all the dependencies.
Constructor Summary | |
---|---|
DependencyActivatorBase()
|
Method Summary | |
---|---|
ConfigurationDependency |
createConfigurationDependency()
Creates a new configuration dependency. |
Service |
createService()
Creates a new service. |
ServiceDependency |
createServiceDependency()
Creates a new service dependency. |
abstract void |
destroy(BundleContext context,
DependencyManager manager)
Destroy the dependency manager. |
abstract void |
init(BundleContext context,
DependencyManager manager)
Initialize the dependency manager. |
void |
start(BundleContext context)
Start method of the bundle activator. |
void |
stop(BundleContext context)
Stop method of the bundle activator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DependencyActivatorBase()
Method Detail |
---|
public abstract void init(BundleContext context, DependencyManager manager) throws Exception
start()
method of the
bundle activator, causing the bundle not to start.
context
- the bundle contextmanager
- the dependency manager
Exception
- if the initialization failspublic abstract void destroy(BundleContext context, DependencyManager manager) throws Exception
stop()
method of the
bundle activator, causing the bundle not to stop.
context
- the bundle contextmanager
- the dependency manager
Exception
- if the destruction failspublic void start(BundleContext context) throws Exception
init()
.
start
in interface BundleActivator
context
- the bundle context
Exception
- If this method throws an exception, this
bundle is marked as stopped and the Framework will remove this
bundle's listeners, unregister all services registered by this
bundle, and release all services used by this bundle.public void stop(BundleContext context) throws Exception
destroy()
method
and cleans up all left over dependencies.
stop
in interface BundleActivator
context
- the bundle context
Exception
- If this method throws an exception, the
bundle is still marked as stopped, and the Framework will remove
the bundle's listeners, unregister all services registered by the
bundle, and release all services used by the bundle.public Service createService()
public ServiceDependency createServiceDependency()
public ConfigurationDependency createConfigurationDependency()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |