Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » context » support » [javadoc | source]
org.springframework.context.support
abstract public class: AbstractXmlApplicationContext [javadoc | source]
java.lang.Object
   org.springframework.core.io.DefaultResourceLoader
      org.springframework.context.support.AbstractApplicationContext
         org.springframework.context.support.AbstractRefreshableApplicationContext
            org.springframework.context.support.AbstractRefreshableConfigApplicationContext
               org.springframework.context.support.AbstractXmlApplicationContext

All Implemented Interfaces:
    BeanNameAware, InitializingBean, ConfigurableApplicationContext, DisposableBean, ResourceLoader

Direct Known Subclasses:
    ClassPathXmlApplicationContext, FileSystemXmlApplicationContext

Convenient base class for org.springframework.context.ApplicationContext implementations, drawing configuration from XML documents containing bean definitions understood by an org.springframework.beans.factory.xml.XmlBeanDefinitionReader .

Subclasses just have to implement the #getConfigResources and/or the #getConfigLocations method. Furthermore, they might override the #getResourceByPath hook to interpret relative paths in an environment-specific fashion, and/or #getResourcePatternResolver for extended pattern resolution.

Fields inherited from org.springframework.context.support.AbstractApplicationContext:
MESSAGE_SOURCE_BEAN_NAME,  APPLICATION_EVENT_MULTICASTER_BEAN_NAME,  logger
Constructor:
 public AbstractXmlApplicationContext() 
 public AbstractXmlApplicationContext(ApplicationContext parent) 
    Create a new AbstractXmlApplicationContext with the given parent context.
    Parameters:
    parent - the parent context
Method from org.springframework.context.support.AbstractXmlApplicationContext Summary:
getConfigResources,   initBeanDefinitionReader,   loadBeanDefinitions,   loadBeanDefinitions
Methods from org.springframework.context.support.AbstractRefreshableConfigApplicationContext:
afterPropertiesSet,   getConfigLocations,   getDefaultConfigLocations,   resolvePath,   setBeanName,   setConfigLocation,   setConfigLocations,   setId
Methods from org.springframework.context.support.AbstractRefreshableApplicationContext:
closeBeanFactory,   createBeanFactory,   customizeBeanFactory,   getBeanFactory,   hasBeanFactory,   loadBeanDefinitions,   refreshBeanFactory,   setAllowBeanDefinitionOverriding,   setAllowCircularReferences
Methods from org.springframework.context.support.AbstractApplicationContext:
addApplicationListener,   addBeanFactoryPostProcessor,   addListener,   cancelRefresh,   close,   closeBeanFactory,   containsBean,   containsBeanDefinition,   containsLocalBean,   destroy,   destroyBeans,   doClose,   finishBeanFactoryInitialization,   finishRefresh,   getAliases,   getApplicationListeners,   getAutowireCapableBeanFactory,   getBean,   getBean,   getBean,   getBeanDefinitionCount,   getBeanDefinitionNames,   getBeanFactory,   getBeanFactoryPostProcessors,   getBeanNamesForType,   getBeanNamesForType,   getBeansOfType,   getBeansOfType,   getDisplayName,   getId,   getInternalParentBeanFactory,   getInternalParentMessageSource,   getMessage,   getMessage,   getMessage,   getParent,   getParentBeanFactory,   getResourcePatternResolver,   getResources,   getStartupDate,   getType,   initApplicationEventMulticaster,   initMessageSource,   invokeBeanFactoryPostProcessors,   isActive,   isPrototype,   isRunning,   isSingleton,   isTypeMatch,   obtainFreshBeanFactory,   onClose,   onRefresh,   postProcessBeanFactory,   prepareBeanFactory,   prepareRefresh,   publishEvent,   refresh,   refreshBeanFactory,   registerBeanPostProcessors,   registerListeners,   registerShutdownHook,   setDisplayName,   setId,   setParent,   start,   stop,   toString
Methods from org.springframework.core.io.DefaultResourceLoader:
getClassLoader,   getResource,   getResourceByPath,   setClassLoader
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.context.support.AbstractXmlApplicationContext Detail:
 protected Resource[] getConfigResources() 
    Return an array of Resource objects, referring to the XML bean definition files that this context should be built with.

    The default implementation returns null. Subclasses can override this to provide pre-built Resource objects rather than location Strings.

 protected  void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) 
    Initialize the bean definition reader used for loading the bean definitions of this context. Default implementation is empty.

    Can be overridden in subclasses, e.g. for turning off XML validation or using a different XmlBeanDefinitionParser implementation.

 protected  void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException 
    Loads the bean definitions via an XmlBeanDefinitionReader.
 protected  void loadBeanDefinitions(XmlBeanDefinitionReader reader) throws IOException, BeansException 
    Load the bean definitions with the given XmlBeanDefinitionReader.

    The lifecycle of the bean factory is handled by the #refreshBeanFactory method; hence this method is just supposed to load and/or register bean definitions.