ch.elca.el4j.core.aop
Class IntelligentBeanTypeAutoProxyCreator

java.lang.Object
  extended by org.springframework.aop.framework.ProxyConfig
      extended by org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
          extended by ch.elca.el4j.core.aop.BeanTypeAutoProxyCreator
              extended by ch.elca.el4j.core.aop.IntelligentBeanTypeAutoProxyCreator
All Implemented Interfaces:
Serializable, AopInfrastructureBean, BeanClassLoaderAware, BeanFactoryAware, BeanPostProcessor, InstantiationAwareBeanPostProcessor, SmartInstantiationAwareBeanPostProcessor, Ordered

public class IntelligentBeanTypeAutoProxyCreator
extends BeanTypeAutoProxyCreator

Intelligent bean type autoproxy creator. Will not create a new proxy for a given bean if this bean is already a proxy bean. All class members (plus getter and setter for them) do just take place in this class, because class AbstractAutoProxyCreator hides them.

Author:
Martin Zeltner (MZE)
See Also:
Serialized Form
File-location:
IntelligentBeanTypeAutoProxyCreator
Last check-in date:
2010-11-02 13:50:18 +0100 (Di, 02. Nov 2010) by sstelca for revision 4208

Field Summary
 
Fields inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
IntelligentBeanTypeAutoProxyCreator()
           
 
Method Summary
protected  Object createProxy(Class beanClass, String beanName, Object[] specificInterceptors, TargetSource targetSource)
          Will not create a new proxy for a given bean if this bean is already a proxy bean.
protected  Object[] getAdvicesAndAdvisorsForBean(Class beanClass, String beanName, TargetSource targetSource)
          Here we additionally de-proxy beans (to avoid that certain applications of interceptors fail).
protected  AdvisorAdapterRegistry getAdvisorAdapterRegistry()
           
protected  String[] getInterceptorNames()
           
protected  boolean isApplyCommonInterceptorsFirst()
           
 void setAdvisorAdapterRegistry(AdvisorAdapterRegistry advisorAdapterRegistry)
          COPYIED FROM SUPERCLASS!
 void setApplyCommonInterceptorsFirst(boolean applyCommonInterceptorsFirst)
          COPYIED FROM SUPERCLASS!
 void setInterceptorNames(String[] interceptorNames)
          COPYIED FROM SUPERCLASS!
 
Methods inherited from class ch.elca.el4j.core.aop.BeanTypeAutoProxyCreator
setInterfaceNames
 
Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
advisorsPreFiltered, buildAdvisors, customizeProxyFactory, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, getOrder, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType, setBeanClassLoader, setBeanFactory, setCustomTargetSourceCreators, setFrozen, setOrder, setProxyClassLoader, shouldProxyTargetClass, shouldSkip, wrapIfNecessary
 
Methods inherited from class org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntelligentBeanTypeAutoProxyCreator

public IntelligentBeanTypeAutoProxyCreator()
Method Detail

createProxy

protected Object createProxy(Class beanClass,
                             String beanName,
                             Object[] specificInterceptors,
                             TargetSource targetSource)
Will not create a new proxy for a given bean if this bean is already a proxy bean.

Overrides:
createProxy in class AbstractAutoProxyCreator

getAdvicesAndAdvisorsForBean

protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass,
                                                String beanName,
                                                TargetSource targetSource)
Here we additionally de-proxy beans (to avoid that certain applications of interceptors fail).

Overrides:
getAdvicesAndAdvisorsForBean in class BeanTypeAutoProxyCreator

getInterceptorNames

protected String[] getInterceptorNames()
Returns:
Returns the interceptorNames.

setInterceptorNames

public void setInterceptorNames(String[] interceptorNames)
COPYIED FROM SUPERCLASS! Added to have access to the interceptor names.

Overrides:
setInterceptorNames in class AbstractAutoProxyCreator

getAdvisorAdapterRegistry

protected AdvisorAdapterRegistry getAdvisorAdapterRegistry()
Returns:
Returns the advisorAdapterRegistry.

setAdvisorAdapterRegistry

public void setAdvisorAdapterRegistry(AdvisorAdapterRegistry advisorAdapterRegistry)
COPYIED FROM SUPERCLASS! Added to have access to the interceptor names.

Overrides:
setAdvisorAdapterRegistry in class AbstractAutoProxyCreator

isApplyCommonInterceptorsFirst

protected boolean isApplyCommonInterceptorsFirst()
Returns:
Returns the applyCommonInterceptorsFirst.

setApplyCommonInterceptorsFirst

public void setApplyCommonInterceptorsFirst(boolean applyCommonInterceptorsFirst)
COPYIED FROM SUPERCLASS! Set whether the common interceptors should be applied before bean-specific ones. Default is "true"; else, bean-specific interceptors will get applied first.

Overrides:
setApplyCommonInterceptorsFirst in class AbstractAutoProxyCreator
Parameters:
applyCommonInterceptorsFirst - See method description.


Copyright © 2005-2011 ELCA. All Rights Reserved.