Save This Page
Home » Spring-Framework-090522 » org.springframework » aop » framework » autoproxy » [javadoc | source]
org.springframework.aop.framework.autoproxy
abstract public class: AbstractAdvisorAutoProxyCreator [javadoc | source]
java.lang.Object
   org.springframework.aop.framework.ProxyConfig
      org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
         org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator

All Implemented Interfaces:
    Ordered, BeanClassLoaderAware, AopInfrastructureBean, SmartInstantiationAwareBeanPostProcessor, BeanFactoryAware, Serializable

Direct Known Subclasses:
    AspectJAwareAdvisorAutoProxyCreator, AnnotationAwareAspectJAutoProxyCreator, InfrastructureAdvisorAutoProxyCreator, DefaultAdvisorAutoProxyCreator

Generic auto proxy creator that builds AOP proxies for specific beans based on detected Advisors for each bean.

Subclasses must implement the abstract #findCandidateAdvisors() method to return a list of Advisors applying to any object. Subclasses can also override the inherited #shouldSkip method to exclude certain objects from auto-proxying.

Advisors or advices requiring ordering should implement the org.springframework.core.Ordered interface. This class sorts Advisors by Ordered order value. Advisors that don't implement the Ordered interface will be considered as unordered; they will appear at the end of the advisor chain in undefined order.

Fields inherited from org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator:
DO_NOT_PROXY,  PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS,  logger
Fields inherited from org.springframework.aop.framework.ProxyConfig:
opaque,  exposeProxy
Method from org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator Summary:
advisorsPreFiltered,   extendAdvisors,   findAdvisorsThatCanApply,   findCandidateAdvisors,   findEligibleAdvisors,   getAdvicesAndAdvisorsForBean,   initBeanFactory,   isEligibleAdvisorBean,   setBeanFactory,   sortAdvisors
Methods from org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator:
advisorsPreFiltered,   buildAdvisors,   createProxy,   customizeProxyFactory,   determineCandidateConstructors,   getAdvicesAndAdvisorsForBean,   getBeanFactory,   getCacheKey,   getCustomTargetSource,   getEarlyBeanReference,   getOrder,   isFrozen,   isInfrastructureClass,   isInfrastructureClass,   postProcessAfterInitialization,   postProcessAfterInstantiation,   postProcessBeforeInitialization,   postProcessBeforeInstantiation,   postProcessPropertyValues,   predictBeanType,   setAdvisorAdapterRegistry,   setApplyCommonInterceptorsFirst,   setBeanClassLoader,   setBeanFactory,   setCustomTargetSourceCreators,   setFrozen,   setInterceptorNames,   setOrder,   setProxyClassLoader,   shouldProxyTargetClass,   shouldSkip,   wrapIfNecessary
Methods from org.springframework.aop.framework.ProxyConfig:
copyFrom,   isExposeProxy,   isFrozen,   isOpaque,   isOptimize,   isProxyTargetClass,   setExposeProxy,   setFrozen,   setOpaque,   setOptimize,   setProxyTargetClass,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator Detail:
 protected boolean advisorsPreFiltered() 
    This auto-proxy creator always returns pre-filtered Advisors.
 protected  void extendAdvisors(List candidateAdvisors) 
    Extension hook that subclasses can override to register additional Advisors, given the sorted Advisors obtained to date.

    The default implementation is empty.

    Typically used to add Advisors that expose contextual information required by some of the later advisors.

 protected List findAdvisorsThatCanApply(List candidateAdvisors,
    Class beanClass,
    String beanName) 
    Search the given candidate Advisors to find all Advisors that can apply to the specified bean.
 protected List findCandidateAdvisors() 
    Find all candidate Advisors to use in auto-proxying.
 protected List findEligibleAdvisors(Class beanClass,
    String beanName) 
    Find all eligible Advisors for auto-proxying this class.
 protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass,
    String beanName,
    TargetSource targetSource) 
 protected  void initBeanFactory(ConfigurableListableBeanFactory beanFactory) 
 protected boolean isEligibleAdvisorBean(String beanName) 
    Return whether the Advisor bean with the given name is eligible for proxying in the first place.
 public  void setBeanFactory(BeanFactory beanFactory) 
 protected List sortAdvisors(List advisors) 
    Sort advisors based on ordering. Subclasses may choose to override this method to customize the sorting strategy.