This is a wrapper class for the OSGi
org.osgi.framework.BundleContextclass. It provides convenience methods for processing Blueprint contexts of modules. This class implements
org.eclipse.gemini.blueprint.context.BundleContextAware, so if it’s published as a Spring bean, the bundle context object should get injected by Spring.
public static final String
The service property set by Blueprint for application contexts published at services. The value for this property will be equal to the symbolic name of the bundle from which the context comes from. It allows to retrieve a published context for a given bundle from the bundle context.
The default constructor, expects the bundle context to be injected by Spring.
Returns the Spring
org.springframework.context.ApplicationContextcreated by Blueprint for the bundle the underlying bundle context comes from. The context is retrieved from the bundle context, since Blueprint publishes application contexts as OSGi services.
Returns: the context created by Blueprint for the bundle the underlying context comes from, or null if there is no context
public <T> T
Retrieves an OSGi service using the underlying bundle context. Note that this will return the service from the first reference, so multiple services for one class are not supported by this method (you will get a random instance).
- clazz – the class of the service to retrieve
- <T> – the class of the service to retrieve
an OSGi service for the class, or null if there is no such service available