|
spring-aop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.aop.framework.ProxyConfig
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
public class DefaultAdvisorAutoProxyCreator
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 DefaultAdvisorAutoProxyCreator'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.
Field Summary | |
---|---|
static java.lang.String |
SEPARATOR
Separator between prefix and remainder of bean name |
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 | |
---|---|
DefaultAdvisorAutoProxyCreator()
|
Method Summary | |
---|---|
java.lang.String |
getAdvisorBeanNamePrefix()
Return the prefix for bean names that will cause them to be included for auto-proxying by this object. |
protected boolean |
isEligibleAdvisorBean(java.lang.String beanName)
Consider Advisor beans with the specified prefix as eligible, if activated. |
boolean |
isUsePrefix()
Return whether to exclude advisors with a certain prefix in the bean name. |
void |
setAdvisorBeanNamePrefix(java.lang.String advisorBeanNamePrefix)
Set the prefix for bean names that will cause them to be included for auto-proxying by this object. |
void |
setBeanName(java.lang.String name)
|
void |
setUsePrefix(boolean usePrefix)
Set whether to exclude advisors with a certain prefix in the bean name. |
Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator |
---|
advisorsPreFiltered, extendAdvisors, findAdvisorsThatCanApply, findCandidateAdvisors, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, initBeanFactory, setBeanFactory, sortAdvisors |
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 |
Field Detail |
---|
public static final java.lang.String SEPARATOR
Constructor Detail |
---|
public DefaultAdvisorAutoProxyCreator()
Method Detail |
---|
public void setUsePrefix(boolean usePrefix)
public boolean isUsePrefix()
public void setAdvisorBeanNamePrefix(java.lang.String advisorBeanNamePrefix)
advisorBeanNamePrefix
- the exclusion prefixpublic java.lang.String getAdvisorBeanNamePrefix()
public void setBeanName(java.lang.String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
protected boolean isEligibleAdvisorBean(java.lang.String beanName)
isEligibleAdvisorBean
in class AbstractAdvisorAutoProxyCreator
beanName
- the name of the Advisor bean
setUsePrefix(boolean)
,
setAdvisorBeanNamePrefix(java.lang.String)
|
spring-aop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |