public class DependencyManager extends DependencyManagerCompat
DependencyActivatorBase
subclass you use as your
BundleActivator
, but it is also possible to create your
own instance.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASPECT |
static java.lang.String |
METHOD_CACHE_SIZE |
static java.lang.String |
PARALLEL
The DependencyManager Activator will wait for a threadpool before creating any DM components if the following
OSGi system property is set to true.
|
static java.lang.String |
SERVICEREGISTRY_CACHE_INDICES |
Constructor and Description |
---|
DependencyManager(BundleContext context)
Creates a new dependency manager.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Component c)
Adds a new component to the dependency manager.
|
void |
clear()
Removes all components and their dependencies.
|
AdapterComponent |
createAdapterComponent()
Creates a new adapter component.
|
AspectComponent |
createAspectComponent()
Creates a new aspect component.
|
BundleComponent |
createBundleComponent()
Creates a new bundle adapter.
|
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 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 timed required service dependency.
|
BundleContext |
getBundleContext()
Returns the bundle context associated with this dependency manager.
|
java.util.List<Component> |
getComponents()
Returns a list of components.
|
static java.util.List<DependencyManager> |
getDependencyManagers()
Returns the list of currently created dependency managers.
|
Logger |
getLogger() |
void |
remove(Component c)
Removes a service from the dependency manager.
|
createAdapterFactoryConfigurationService, createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAdapterService, createAspectService, createAspectService, createAspectService, createAspectService, createAspectService, createBundleAdapterService, createBundleAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createFactoryConfigurationAdapterService, createResourceAdapterService, createResourceAdapterService, createResourceAdapterService, createResourceAdapterService
public static final java.lang.String PARALLEL
public static final java.lang.String ASPECT
public static final java.lang.String SERVICEREGISTRY_CACHE_INDICES
public static final java.lang.String METHOD_CACHE_SIZE
public DependencyManager(BundleContext context)
BundleContext
to be used by the dependency
manager to register services and communicate with the
framework.context
- the bundle contextpublic Logger getLogger()
public static java.util.List<DependencyManager> getDependencyManagers()
public BundleContext getBundleContext()
public void add(Component c)
c
- the service to addpublic void remove(Component c)
c
- the component to removepublic Component<?> createComponent()
public ServiceDependency createServiceDependency()
public ConfigurationDependency createConfigurationDependency()
public BundleDependency createBundleDependency()
public ResourceDependency createResourceDependency()
public ServiceDependency createTemporalServiceDependency(long timeout)
public AdapterComponent createAdapterComponent()
createAdapterComponent
in class DependencyManagerCompat
public FactoryComponent createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.createFactoryComponent
in class DependencyManagerCompat
public BundleComponent createBundleComponent()
createBundleComponent
in class DependencyManagerCompat
public ResourceComponent createResourceComponent()
createResourceComponent
in class DependencyManagerCompat
public java.util.List<Component> getComponents()
public AspectComponent createAspectComponent()
createAspectComponent
in class DependencyManagerCompat
public void clear()
public PropertyMetaData createPropertyMetaData()