Sonic ESB API

com.sonicsw.esb.service.common.util.spring
Class DuplicateAwareApplicationContext

java.lang.Object
  extended by org.springframework.core.io.DefaultResourceLoader
      extended by org.springframework.context.support.AbstractApplicationContext
          extended by org.springframework.context.support.GenericApplicationContext
              extended by com.sonicsw.esb.service.common.util.spring.DuplicateAwareApplicationContext
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactory, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.beans.factory.ListableBeanFactory, org.springframework.beans.factory.support.BeanDefinitionRegistry, org.springframework.context.ApplicationContext, org.springframework.context.ApplicationEventPublisher, org.springframework.context.ConfigurableApplicationContext, org.springframework.context.Lifecycle, org.springframework.context.MessageSource, org.springframework.core.AliasRegistry, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver

public class DuplicateAwareApplicationContext
extends org.springframework.context.support.GenericApplicationContext

Application context that keeps track of components that are registered and then later overridden.


Field Summary
 
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, MESSAGE_SOURCE_BEAN_NAME
 
Fields inherited from interface org.springframework.context.ConfigurableApplicationContext
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_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
DuplicateAwareApplicationContext()
           
DuplicateAwareApplicationContext(org.springframework.context.ApplicationContext parent)
           
 
Method Summary
 void clearHistory()
          Clears the history of overridden component names.
 java.util.Set getOverridenBeanNames()
          Returns the set of component names that have been overridden since the history was last cleared.
 void registerBeanDefinition(java.lang.String beanName, org.springframework.beans.factory.config.BeanDefinition beanDefinition)
           
 void setAllowBeanDefinitionOverriding(boolean bool)
          Specifies whether or not beans can be replaced after they have been registered.
 
Methods inherited from class org.springframework.context.support.GenericApplicationContext
getBeanDefinition, getBeanFactory, getDefaultListableBeanFactory, getResource, getResources, isAlias, isBeanNameInUse, registerAlias, removeAlias, removeBeanDefinition, setAllowCircularReferences, setId, setParent, setResourceLoader
 
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, findAnnotationOnBean, getAliases, getApplicationListeners, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getId, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getStartupDate, getType, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, publishEvent, refresh, registerShutdownHook, setDisplayName, start, stop, toString
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getClassLoader, setClassLoader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.beans.factory.support.BeanDefinitionRegistry
containsBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames
 
Methods inherited from interface org.springframework.core.AliasRegistry
getAliases
 
Methods inherited from interface org.springframework.core.io.ResourceLoader
getClassLoader
 

Constructor Detail

DuplicateAwareApplicationContext

public DuplicateAwareApplicationContext()

DuplicateAwareApplicationContext

public DuplicateAwareApplicationContext(org.springframework.context.ApplicationContext parent)
Method Detail

registerBeanDefinition

public void registerBeanDefinition(java.lang.String beanName,
                                   org.springframework.beans.factory.config.BeanDefinition beanDefinition)
                            throws org.springframework.beans.BeansException
Specified by:
registerBeanDefinition in interface org.springframework.beans.factory.support.BeanDefinitionRegistry
Overrides:
registerBeanDefinition in class org.springframework.context.support.GenericApplicationContext
Throws:
org.springframework.beans.BeansException

getOverridenBeanNames

public java.util.Set getOverridenBeanNames()
Returns the set of component names that have been overridden since the history was last cleared.


clearHistory

public void clearHistory()
Clears the history of overridden component names.


setAllowBeanDefinitionOverriding

public void setAllowBeanDefinitionOverriding(boolean bool)
Specifies whether or not beans can be replaced after they have been registered. Defaults to true.

Overrides:
setAllowBeanDefinitionOverriding in class org.springframework.context.support.GenericApplicationContext
Parameters:
bool - true if beans can be overridden; false otherwise

Sonic ESB API

Copyright © 2001-2013 Aurea, Inc. All Rights Reserved.
HTML formatted on 29-April-2013.