public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator
extends java.lang.Object
implements org.springframework.beans.factory.xml.BeanDefinitionDecorator
BeanDefinitionDecorators
wishing to add an interceptor
to the resulting bean.
This base class controls the creation of the ProxyFactoryBean bean definition
and wraps the original as an inner-bean definition for the target property
of ProxyFactoryBean.
Chaining is correctly handled, ensuring that only one ProxyFactoryBean definition
is created. If a previous BeanDefinitionDecorator
already created the ProxyFactoryBean then the
interceptor is simply added to the existing definition.
Subclasses have only to create the BeanDefinition to the interceptor that
they wish to add.
MethodInterceptor| Constructor and Description |
|---|
AbstractInterceptorDrivenBeanDefinitionDecorator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.springframework.beans.factory.config.BeanDefinition |
createInterceptorDefinition(org.w3c.dom.Node node)
Subclasses should implement this method to return the
BeanDefinition
for the interceptor they wish to apply to the bean being decorated. |
org.springframework.beans.factory.config.BeanDefinitionHolder |
decorate(org.w3c.dom.Node node,
org.springframework.beans.factory.config.BeanDefinitionHolder definitionHolder,
org.springframework.beans.factory.xml.ParserContext parserContext) |
protected java.lang.String |
getInterceptorNameSuffix(org.springframework.beans.factory.config.BeanDefinition interceptorDefinition) |
public AbstractInterceptorDrivenBeanDefinitionDecorator()
public final org.springframework.beans.factory.config.BeanDefinitionHolder decorate(org.w3c.dom.Node node,
org.springframework.beans.factory.config.BeanDefinitionHolder definitionHolder,
org.springframework.beans.factory.xml.ParserContext parserContext)
decorate in interface org.springframework.beans.factory.xml.BeanDefinitionDecoratorprotected java.lang.String getInterceptorNameSuffix(org.springframework.beans.factory.config.BeanDefinition interceptorDefinition)
protected abstract org.springframework.beans.factory.config.BeanDefinition createInterceptorDefinition(org.w3c.dom.Node node)
BeanDefinition
for the interceptor they wish to apply to the bean being decorated.