org.springframework.aop.framework.autoproxy
Class AdvisorAutoProxyCreator

org.springframework.aop.framework.ProxyConfig
  |
  +--org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
        |
        +--org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
              |
              +--org.springframework.aop.framework.autoproxy.AdvisorAutoProxyCreator

public class AdvisorAutoProxyCreator
extends AbstractAdvisorAutoProxyCreator
implements BeanNameAware

BeanPostProcessor implementation that creates AOP proxies based on all candidate Advisors in the current BeanFactory. This class is completely generic; it contains no special code to handle any particular aspects, such as pooling aspects.

It's possible to filter out advisors -- for example, to use multiple post processors of this type in the same factory - -by setting the usePrefix property to true, in which case only advisors beginning with the AdvisorAutoProxyCreator's bean name followed by a dot (like "aapc.") will be used. This default prefix can be changed from the bean name by setting the advisorBeanNamePrefix property. The separator (.) will also be used in this case.

Author:
Rod Johnson
Version: $Id: AdvisorAutoProxyCreator.java,v 1.6 2004/02/04 17:42:50 jhoeller Exp $

Field Summary
 final static StringSEPARATOR
          Separator between prefix and remainder of bean name

Method Summary
 StringgetAdvisorBeanNamePrefix()
          Return the prefix for bean names that will cause them not to be considered for autoproxying by this object.
 booleangetUsePrefix()
           
 voidsetAdvisorBeanNamePrefix(String infrastructureBeanNamePrefix)
          Set the prefix for bean names that will cause them to be excluded for autoproxying by this object.
 voidsetBeanName(String name)
           
 voidsetUsePrefix(boolean usePrefix)
           

Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
setBeanFactory

Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
getOrder, postProcessAfterInitialization, postProcessBeforeInitialization, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setInterceptorNames, setOrder

Methods inherited from class org.springframework.aop.framework.ProxyConfig
copyFrom, getExposeProxy, getOptimize, getProxyTargetClass, setExposeProxy, setOptimize, setProxyTargetClass, toString

Field Detail

SEPARATOR

public final static String SEPARATOR
Separator between prefix and remainder of bean name
Method Detail

getAdvisorBeanNamePrefix

public String getAdvisorBeanNamePrefix()
Return the prefix for bean names that will cause them not to be considered for autoproxying by this object.

getUsePrefix

public boolean getUsePrefix()
Returns: Returns the usePrefix.

setAdvisorBeanNamePrefix

public void setAdvisorBeanNamePrefix(String infrastructureBeanNamePrefix)
Set the prefix for bean names that will cause them to be excluded for autoproxying by this object. This prefix should be set to avoid circular references. Default value is the bean name of this object.
Parameters:
infrastructureBeanNamePrefix - new exclusion prefix

setBeanName

public void setBeanName(String name)
See Also:
org.springframework.beans.factory.BeanNameAware.setBeanName(java.lang.String)

setUsePrefix

public void setUsePrefix(boolean usePrefix)
Parameters:
usePrefix - The usePrefix to set.

Association Links

to Class java.lang.String

Separator between prefix and remainder of bean name

to Class java.lang.String

Prefix that will screen out auto proxying