public class ContextLoaderListener extends Object implements org.osgi.framework.BundleActivator
META-INF/spring/*.xml
files and merge them into an application context. From the resulting
context, the context will look for beans with predefined names to determine its configuration. The current version
recognises the following bean names:
Bean Name | Bean Type | Description |
---|---|---|
taskExecutor | org.springframework.core.task.TaskExecutor | Task executor used for creating the discovered application contexts. |
shutdownTaskExecutor |
org.springframework.core.task.TaskExecutor | Task executor used for shutting down various application contexts. |
extenderProperties |
java.util.Properties | Various properties for configuring the extender behaviour (see below) |
extenderProperties
recognises the following properties:
Name | Type | Description |
---|---|---|
shutdown.wait.time | Number | The amount of time the extender will wait for each application context to shutdown gracefully. Expressed in milliseconds. |
process.annotations | Boolean | Whether or not, the extender will process SpringOSGi annotations. |
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
ContextLoaderListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
addApplicationListener(OsgiBundleApplicationContextEventMulticaster multicaster) |
protected ApplicationContextConfigurationFactory |
createContextConfigFactory() |
protected OsgiContextProcessor |
createContextProcessor() |
protected String |
getManagedBundleExtenderVersionHeader() |
protected TypeCompatibilityChecker |
getTypeCompatibilityChecker() |
protected ExtenderConfiguration |
initExtenderConfiguration(org.osgi.framework.BundleContext bundleContext) |
protected void |
initListenerService() |
protected void |
initNamespaceHandlers(org.osgi.framework.BundleContext context) |
protected void |
initStartedBundles(org.osgi.framework.BundleContext bundleContext) |
protected void |
maybeAddNamespaceHandlerFor(org.osgi.framework.Bundle bundle,
boolean isLazy) |
protected void |
maybeRemoveNameSpaceHandlerFor(org.osgi.framework.Bundle bundle) |
protected void |
shutdown()
Shutdown the extender and all bundled managed by it.
|
void |
start(org.osgi.framework.BundleContext context)
Called by OSGi when this bundle is started.
|
void |
stop(org.osgi.framework.BundleContext context)
Called by OSGi when this bundled is stopped.
|
public void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
Exception
BundleActivator.start(org.osgi.framework.BundleContext)
protected ExtenderConfiguration initExtenderConfiguration(org.osgi.framework.BundleContext bundleContext)
protected OsgiContextProcessor createContextProcessor()
protected TypeCompatibilityChecker getTypeCompatibilityChecker()
protected String getManagedBundleExtenderVersionHeader()
protected void initNamespaceHandlers(org.osgi.framework.BundleContext context)
protected void initStartedBundles(org.osgi.framework.BundleContext bundleContext)
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
Exception
BundleActivator.stop(org.osgi.framework.BundleContext)
protected void shutdown()
protected void maybeAddNamespaceHandlerFor(org.osgi.framework.Bundle bundle, boolean isLazy)
protected void maybeRemoveNameSpaceHandlerFor(org.osgi.framework.Bundle bundle)
protected ApplicationContextConfigurationFactory createContextConfigFactory()
protected void initListenerService()
protected void addApplicationListener(OsgiBundleApplicationContextEventMulticaster multicaster)
Copyright © 2006–2015. All rights reserved.