Home » Spring-Framework-090522 » org.springframework » web » context » support » [javadoc | source]
org.springframework.web.context.support
abstract public class: AbstractRefreshableWebApplicationContext [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.web.context.support.AbstractRefreshableWebApplicationContext

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

Direct Known Subclasses:
    XmlWebApplicationContext

org.springframework.context.support.AbstractRefreshableApplicationContext subclass which implements the org.springframework.web.context.ConfigurableWebApplicationContext interface for web environments. Provides a "configLocations" property, to be populated through the ConfigurableWebApplicationContext interface on web application startup.

This class is as easy to subclass as AbstractRefreshableApplicationContext: All you need to implements is the #loadBeanDefinitions method; see the superclass javadoc for details. Note that implementations are supposed to load bean definitions from the files specified by the locations returned by the #getConfigLocations method.

Interprets resource paths as servlet context resources, i.e. as paths beneath the web application root. Absolute paths, e.g. for files outside the web app root, can be accessed via "file:" URLs, as implemented by org.springframework.core.io.DefaultResourceLoader .

In addition to the special beans detected by org.springframework.context.support.AbstractApplicationContext , this class detects a bean of type org.springframework.ui.context.ThemeSource in the context, under the special bean name "themeSource".

This is the web context to be subclassed for a different bean definition format. Such a context implementation can be specified as "contextClass" context-param for org.springframework.web.context.ContextLoader or as "contextClass" init-param for org.springframework.web.servlet.FrameworkServlet , replacing the default XmlWebApplicationContext . It will then automatically receive the "contextConfigLocation" context-param or init-param, respectively.

Note that WebApplicationContext implementations are generally supposed to configure themselves based on the configuration received through the ConfigurableWebApplicationContext interface. In contrast, a standalone application context might allow for configuration in custom startup code (for example, org.springframework.context.support.GenericApplicationContext ).

Fields inherited from org.springframework.context.support.AbstractApplicationContext:
MESSAGE_SOURCE_BEAN_NAME,  APPLICATION_EVENT_MULTICASTER_BEAN_NAME,  logger
Constructor:
 public AbstractRefreshableWebApplicationContext() 
Method from org.springframework.web.context.support.AbstractRefreshableWebApplicationContext Summary:
getConfigLocations,   getNamespace,   getResourceByPath,   getResourcePatternResolver,   getServletConfig,   getServletContext,   getTheme,   onRefresh,   postProcessBeanFactory,   setNamespace,   setServletConfig,   setServletContext
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:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.web.context.support.AbstractRefreshableWebApplicationContext Detail:
 public String[] getConfigLocations() 
 public String getNamespace() 
 protected Resource getResourceByPath(String path) 
    This implementation supports file paths beneath the root of the ServletContext.
 protected ResourcePatternResolver getResourcePatternResolver() 
    This implementation supports pattern matching in unexpanded WARs too.
 public ServletConfig getServletConfig() 
 public ServletContext getServletContext() 
 public Theme getTheme(String themeName) 
 protected  void onRefresh() 
    Initialize the theme capability.
 protected  void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) 
 public  void setNamespace(String namespace) 
 public  void setServletConfig(ServletConfig servletConfig) 
 public  void setServletContext(ServletContext servletContext)