GigaSpaces XAP 10.0.1 API

org.openspaces.pu.container.support
Class ResourceApplicationContext

java.lang.Object
  extended by org.springframework.core.io.DefaultResourceLoader
      extended by org.springframework.context.support.AbstractApplicationContext
          extended by org.springframework.context.support.AbstractRefreshableApplicationContext
              extended by org.springframework.context.support.AbstractRefreshableConfigApplicationContext
                  extended by org.springframework.context.support.AbstractXmlApplicationContext
                      extended by org.openspaces.pu.container.support.ResourceApplicationContext
All Implemented Interfaces:
Aware, BeanFactory, BeanNameAware, DisposableBean, HierarchicalBeanFactory, InitializingBean, ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, EnvironmentCapable, ResourceLoader, ResourcePatternResolver

public class ResourceApplicationContext
extends AbstractXmlApplicationContext

A Spring ApplicationContext implementation that works with Spring Resource for config locations.

By default this application does not "start" and requires explicit call to AbstractApplicationContext.refresh().

Author:
kimchy

Field Summary
 
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME
 
Fields inherited from interface org.springframework.context.ConfigurableApplicationContext
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_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
ResourceApplicationContext(Resource[] resources, ApplicationContext parent)
          Create this application context with a list of resources for configuration and an optional parent application context (can be null).
 
Method Summary
 void addBeanPostProcessor(BeanPostProcessor beanPostProcessor)
          Adds Spring bean post processor.
protected  DefaultListableBeanFactory createBeanFactory()
          Creates a new bean factory by delegating to the super bean factory creation and then adding all the registered BeanPostProcessors.
protected  Resource[] getConfigResources()
          Returns the config resources this application context uses.
protected  ResourcePatternResolver getResourcePatternResolver()
          Overrides in order to return PUPathMatchingResourcePatternResolver which allows to perform path mathcing over a remote processing unit.
 
Methods inherited from class org.springframework.context.support.AbstractXmlApplicationContext
initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions, setValidating
 
Methods inherited from class org.springframework.context.support.AbstractRefreshableConfigApplicationContext
afterPropertiesSet, getConfigLocations, getDefaultConfigLocations, resolvePath, setBeanName, setConfigLocation, setConfigLocations, setId
 
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
cancelRefresh, closeBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferences
 
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, addListener, close, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroy, destroyBeans, doClose, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResources, getStartupDate, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, setDisplayName, setEnvironment, setParent, start, stop, toString
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getClassLoader, getResource, getResourceByPath, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.core.io.ResourceLoader
getClassLoader, getResource
 

Constructor Detail

ResourceApplicationContext

public ResourceApplicationContext(Resource[] resources,
                                  ApplicationContext parent)
Create this application context with a list of resources for configuration and an optional parent application context (can be null).

Parameters:
resources - List of xml config resources
parent - An optional parent application context
Method Detail

getConfigResources

protected Resource[] getConfigResources()
Returns the config resources this application context uses.

Overrides:
getConfigResources in class AbstractXmlApplicationContext

addBeanPostProcessor

public void addBeanPostProcessor(BeanPostProcessor beanPostProcessor)
Adds Spring bean post processor. Note, this method should be called before the AbstractApplicationContext.refresh() is called on this application context for the bean post processor to take affect.

Parameters:
beanPostProcessor - The bean post processor to add

createBeanFactory

protected DefaultListableBeanFactory createBeanFactory()
Creates a new bean factory by delegating to the super bean factory creation and then adding all the registered BeanPostProcessors.

Overrides:
createBeanFactory in class AbstractRefreshableApplicationContext

getResourcePatternResolver

protected ResourcePatternResolver getResourcePatternResolver()
Overrides in order to return PUPathMatchingResourcePatternResolver which allows to perform path mathcing over a remote processing unit.

Overrides:
getResourcePatternResolver in class AbstractApplicationContext

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.