Class SpringContextPluginBundleActivator
java.lang.Object
eu.rarogsoftware.rarog.platform.plugins.context.SpringContextPluginBundleActivator
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class SpringContextPluginBundleActivator
extends Object
implements org.osgi.framework.BundleActivator
Implementation of
BundleActivator
that out-of-box provide all needed functionality for spring based plugins.
This activator provides full set of functionality for spring based plugin without need for further configuration.
It automatically:
- initializes spring context for provided `META-INF/spring/beans.xml`,
- provides support for
ExportComponent
andComponentImport
annotations, - exports and imports spring components to/from OSGi,
- invokes basic initializers available in API package,
- exposes
PluginActivator
if none is present in spring context, - exposes
FeatureDescriptor
s available in spring context, - cleans spring context and exposed services on bundle stop.
By default it exposes SimplePluginActivator
if none is found in spring context. If plugin
expose implementation of PluginActivator
it will be used instead.
Exposed spring beans have additional property `BeanName` with original bean name, that allow filtering for bean name in OSGi.
- Since:
- 1.0.0
- See Also:
-
BundleActivator
SimplePluginActivator
PluginActivator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.osgi.framework.BundleContext
protected OsgiPluginApplicationContext
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
bundleContext
protected org.osgi.framework.BundleContext bundleContext -
springContext
-
-
Constructor Details
-
SpringContextPluginBundleActivator
public SpringContextPluginBundleActivator()
-
-
Method Details