|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.io.DefaultResourceLoader org.springframework.context.support.AbstractApplicationContext org.springframework.context.support.AbstractRefreshableApplicationContext org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext org.springframework.osgi.internal.context.support.AbstractDelegatedExecutionApplicationContext org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext
public class OsgiBundleXmlApplicationContext
XML specific application context backed by an OSGi bundle.
Field Summary |
---|
Fields inherited from class org.springframework.context.support.AbstractApplicationContext |
---|
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME |
Fields inherited from interface org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext |
---|
APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME, BUNDLE_CONTEXT_BEAN_NAME |
Fields inherited from interface org.springframework.context.ConfigurableApplicationContext |
---|
LOAD_TIME_WEAVER_BEAN_NAME |
Fields inherited from interface org.springframework.beans.factory.BeanFactory |
---|
FACTORY_BEAN_PREFIX |
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
CLASSPATH_ALL_URL_PREFIX |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
---|
CLASSPATH_URL_PREFIX |
Constructor Summary | |
---|---|
OsgiBundleXmlApplicationContext(String[] configLocations)
|
Method Summary | |
---|---|
protected String[] |
getDefaultConfigLocations()
Return the default config locations to use, for the case where no explicit config locations have been specified. |
protected void |
initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader)
Allows subclasses to do custom initialization here. |
protected void |
loadBeanDefinitions(DefaultListableBeanFactory beanFactory)
Loads the bean definitions via an XmlBeanDefinitionReader. |
protected void |
loadBeanDefinitions(XmlBeanDefinitionReader reader)
Load the bean definitions with the given XmlBeanDefinitionReader. |
Methods inherited from class org.springframework.osgi.internal.context.support.AbstractDelegatedExecutionApplicationContext |
---|
doClose, finishRefresh, getMonitor, isAvailable, normalClose, normalRefresh, postRefresh, preRefresh, refresh, setExecutor |
Methods inherited from class org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext |
---|
cleanOsgiBundleScope, createBundleClassLoader, destroyBeans, getBundle, getBundleContext, getBundleSymbolicName, getClassLoader, getConfigLocations, getResource, getResourceByPath, getResourcePatternResolver, getResources, obtainFreshBeanFactory, postProcessBeanFactory, publishContextAsOsgiServiceIfNecessary, setBundleContext, setClassLoader, setConfigLocations, setPublishContextAsService |
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext |
---|
closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, refreshBeanFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext |
---|
getBundle, getBundleContext, setBundleContext, setConfigLocations, setPublishContextAsService |
Methods inherited from interface org.springframework.context.ConfigurableApplicationContext |
---|
addApplicationListener, addBeanFactoryPostProcessor, close, getBeanFactory, isActive, registerShutdownHook, setParent |
Methods inherited from interface org.springframework.context.ApplicationContext |
---|
getAutowireCapableBeanFactory, getDisplayName, getParent, getStartupDate |
Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory |
---|
containsBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType |
Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory |
---|
containsLocalBean, getParentBeanFactory |
Methods inherited from interface org.springframework.beans.factory.BeanFactory |
---|
containsBean, getAliases, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch |
Methods inherited from interface org.springframework.context.MessageSource |
---|
getMessage, getMessage, getMessage |
Methods inherited from interface org.springframework.context.ApplicationEventPublisher |
---|
publishEvent |
Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
getResources |
Methods inherited from interface org.springframework.core.io.ResourceLoader |
---|
getClassLoader, getResource |
Methods inherited from interface org.springframework.context.Lifecycle |
---|
isRunning, start, stop |
Constructor Detail |
---|
public OsgiBundleXmlApplicationContext(String[] configLocations)
Method Detail |
---|
protected String[] getDefaultConfigLocations()
AbstractOsgiBundleApplicationContext
Default implementation returns null, requiring explicit config locations.
getDefaultConfigLocations
in class AbstractOsgiBundleApplicationContext
AbstractOsgiBundleApplicationContext.setConfigLocations(java.lang.String[])
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException
loadBeanDefinitions
in class AbstractRefreshableApplicationContext
IOException
XmlBeanDefinitionReader
,
initBeanDefinitionReader(org.springframework.beans.factory.xml.XmlBeanDefinitionReader)
,
loadBeanDefinitions(org.springframework.beans.factory.support.DefaultListableBeanFactory)
protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader)
beanDefinitionReader
- protected void loadBeanDefinitions(XmlBeanDefinitionReader reader) throws BeansException, IOException
The lifecycle of the bean factory is handled by the refreshBeanFactory method; therefore this method is just supposed to load and/or register bean definitions.
Delegates to a ResourcePatternResolver for resolving location patterns into Resource instances.
BeansException
- in case of bean
registration errors
IOException
- if the required XML document isn't foundAbstractRefreshableApplicationContext.refreshBeanFactory()
,
AbstractOsgiBundleApplicationContext.getConfigLocations()
,
AbstractOsgiBundleApplicationContext.getResources(java.lang.String)
,
AbstractOsgiBundleApplicationContext.getResourcePatternResolver()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |