public abstract class DependencyActivatorBase extends DependencyActivatorBaseCompat
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 and Description |
---|
DependencyActivatorBase() |
Modifier and Type | Method and Description |
---|---|
AdapterComponent |
createAdapterComponent()
Creates a new adapter service.
|
AspectComponent |
createAspectComponent()
Creates a new aspect component.
|
BundleComponent |
createBundleComponent()
Creates a new bundle adapter component.
|
BundleDependency |
createBundleDependency()
Creates a new bundle dependency.
|
Component<?> |
createComponent()
Creates a new component.
|
ConfigurationDependency |
createConfigurationDependency()
Creates a new configuration dependency.
|
FactoryComponent |
createFactoryComponent()
Creates a new factory configuration component.
|
PropertyMetaData |
createPropertyMetaData()
Creates a new configuration property metadata.
|
ResourceComponent |
createResourceComponent()
Creates a new resource adapter component.
|
ResourceDependency |
createResourceDependency()
Creates a new resource dependency.
|
ServiceDependency |
createServiceDependency()
Creates a new service dependency.
|
ServiceDependency |
createTemporalServiceDependency(long timeout)
Creates a new temporal service dependency.
|
void |
destroy(BundleContext context,
DependencyManager manager)
Destroy the dependency manager.
|
BundleContext |
getBundleContext()
Returns the bundle context that is associated with this bundle.
|
DependencyManager |
getDependencyManager()
Returns the dependency manager that is associated with this bundle.
|
Logger |
getLogger()
Returns the logger that is associated with this bundle.
|
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.
|
createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAspectService, createAspectService, createAspectService, createAspectService, createAspectService, createBundleAdapterService, createBundleAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createResourceAdapter, createResourceAdapter, createResourceAdapter, createResourceAdapter, setDependencyManager
public abstract void init(BundleContext context, DependencyManager manager) throws java.lang.Exception
start()
method of the
bundle activator, causing the bundle not to start.context
- the bundle contextmanager
- the dependency managerjava.lang.Exception
- if the initialization failspublic void destroy(BundleContext context, DependencyManager manager) throws java.lang.Exception
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.
context
- the bundle contextmanager
- the dependency managerjava.lang.Exception
- if the destruction failspublic void start(BundleContext context) throws java.lang.Exception
init()
.context
- the bundle contextjava.lang.Exception
public void stop(BundleContext context) throws java.lang.Exception
destroy()
method
and cleans up all left over dependencies.context
- the bundle contextjava.lang.Exception
public BundleContext getBundleContext()
public DependencyManager getDependencyManager()
public Logger getLogger()
public Component<?> createComponent()
public BundleComponent createBundleComponent()
public AspectComponent createAspectComponent()
DependencyManager.createAspectComponent()
public AdapterComponent createAdapterComponent()
DependencyManagerCompat.createAdapterService(Class, String)
public FactoryComponent createFactoryComponent()
DependencyManager.createFactoryComponent()
public ServiceDependency createServiceDependency()
public ServiceDependency createTemporalServiceDependency(long timeout)
timeout
- the max number of milliseconds to wait for a service availability.public ConfigurationDependency createConfigurationDependency()
public PropertyMetaData createPropertyMetaData()
public BundleDependency createBundleDependency()
public ResourceDependency createResourceDependency()
public ResourceComponent createResourceComponent()