BeanPostProcessor implementations that apply a
Spring AOP Advisor to specific beans.
| Modifier and Type | Field and Description |
|---|---|
| protected Advisor | |
| protected boolean | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | customizeProxyFactory(ProxyFactory
the ProxyFactory that is already configured with
target, advisor and interfaces and will be used to create the proxy
immediately after this method returns proxyFactory)Subclasses may choose to implement this: for example, to change the interfaces exposed. |
| public Class | determineBeanType(Class<?>
the raw class of the bean beanClass, String the name of the bean beanName)Overrides default org. Determine the type of the bean to be eventually returned from this
processor's |
| protected boolean | isEligible(Object
the bean instance bean, String the name of the bean beanName)Check whether the given bean is eligible for advising with this
post-processor's |
| protected boolean | isEligible(Class<?>
the class to check against targetClass)Check whether the given class is eligible for advising with this
post-processor's |
| public Object | postProcessAfterInitialization(Object
the new bean instance bean, String the name of the bean beanName)Overrides default org. Apply this |
| protected ProxyFactory | Returns: the ProxyFactory, initialized with this processor'sProxyConfig settings and the specified beanthe bean instance to create a proxy for bean, String the corresponding bean name beanName)Prepare a |
| public void | setBeforeExistingAdvisors(boolean beforeExistingAdvisors)
Set whether this post-processor's advisor is supposed to apply before existing advisors when encountering a pre-advised object. |
| advisor | back to summary |
|---|---|
| protected Advisor advisor
| |
| beforeExistingAdvisors | back to summary |
|---|---|
| protected boolean beforeExistingAdvisors | |
| eligibleBeans | back to summary |
|---|---|
| private final Map<Class<?>, Boolean> eligibleBeans | |
| AbstractAdvisingBeanPostProcessor | back to summary |
|---|---|
| public AbstractAdvisingBeanPostProcessor() | |
| customizeProxyFactory | back to summary |
|---|---|
| protected void customizeProxyFactory(ProxyFactory proxyFactory) Subclasses may choose to implement this: for example, to change the interfaces exposed. The default implementation is empty.
| |
| determineBeanType | back to summary |
|---|---|
| public Class Overrides default org. Doc from org. Determine the type of the bean to be eventually returned from this
processor's The default implementation returns the given bean class as-is. Specific implementations should fully evaluate their processing steps in order to create/initialize a potential proxy class upfront. | |
| isEligible | back to summary |
|---|---|
| protected boolean isEligible(Object bean, String beanName) Check whether the given bean is eligible for advising with this
post-processor's Delegates to Note Only called for regular bean instances but not for existing
proxy instances which implement
| |
| isEligible | back to summary |
|---|---|
| protected boolean isEligible(Class<?> targetClass) Check whether the given class is eligible for advising with this
post-processor's Implements caching of
| |
| postProcessAfterInitialization | back to summary |
|---|---|
| public Object postProcessAfterInitialization(Object bean, String beanName) Overrides default org. Doc from org. Apply this In case of a FactoryBean, this callback will be invoked for both the FactoryBean
instance and the objects created by the FactoryBean (as of Spring 2.0). The
post-processor can decide whether to apply to either the FactoryBean or created
objects or both through corresponding This callback will also be invoked after a short-circuiting triggered by a
The default implementation returns the given | |
| prepareProxyFactory | back to summary |
|---|---|
| protected ProxyFactory prepareProxyFactory(Object bean, String beanName) Prepare a Subclasses may customize the handling of the target instance and in
particular the exposure of the target class. The default introspection
of interfaces for non-target-class proxies and the configured advisor
will be applied afterwards;
| |
| setBeforeExistingAdvisors | back to summary |
|---|---|
| public void setBeforeExistingAdvisors(boolean beforeExistingAdvisors) Set whether this post-processor's advisor is supposed to apply before existing advisors when encountering a pre-advised object. Default is "false", applying the advisor after existing advisors, i.e. as close as possible to the target method. Switch this to "true" in order for this post-processor's advisor to wrap existing advisors as well. Note Check the concrete post-processor's javadoc whether it possibly changes this flag by default, depending on the nature of its advisor. | |