public class DefaultOsgiApplicationContextCreator extends Object implements OsgiApplicationContextCreator
OsgiApplicationContextCreator
implementation.
Creates an OsgiBundleXmlApplicationContext
instance using the
default locations (Spring-Context manifest header or
META-INF/spring/*.xml) if available, null otherwise.
Additionally, this implementation allows custom locations to be
specified through ConfigurationScanner
interface.ConfigurationScanner
Constructor and Description |
---|
DefaultOsgiApplicationContextCreator() |
Modifier and Type | Method and Description |
---|---|
DelegatedExecutionOsgiBundleApplicationContext |
createApplicationContext(org.osgi.framework.BundleContext bundleContext)
Creates an application context for the given bundle context.
|
void |
setConfigurationScanner(ConfigurationScanner configurationScanner)
Sets the configurationScanner used by this creator.
|
public DefaultOsgiApplicationContextCreator()
public DelegatedExecutionOsgiBundleApplicationContext createApplicationContext(org.osgi.framework.BundleContext bundleContext) throws Exception
OsgiApplicationContextCreator
null
should be
returned. Exceptions will be caught and logged but will not prevent the
creation of other application contexts.createApplicationContext
in interface OsgiApplicationContextCreator
bundleContext
- OSGi bundle context determining the context creationnull
if no context should be created, non-
null
otherwiseException
- if something goes wrongpublic void setConfigurationScanner(ConfigurationScanner configurationScanner)
configurationScanner
- The configurationScanner to set.Copyright © 2006–2014. All rights reserved.