Package org.springframework.aop.config
Class AbstractInterceptorDrivenBeanDefinitionDecorator
java.lang.Object
org.springframework.aop.config.AbstractInterceptorDrivenBeanDefinitionDecorator
- All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionDecorator
public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator
extends Object
implements org.springframework.beans.factory.xml.BeanDefinitionDecorator
Base implementation for
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.
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.springframework.beans.factory.config.BeanDefinitionSubclasses should implement this method to return theBeanDefinitionfor the interceptor they wish to apply to the bean being decorated.final org.springframework.beans.factory.config.BeanDefinitionHolderdecorate(Node node, org.springframework.beans.factory.config.BeanDefinitionHolder definitionHolder, org.springframework.beans.factory.xml.ParserContext parserContext) protected StringgetInterceptorNameSuffix(org.springframework.beans.factory.config.BeanDefinition interceptorDefinition)
-
Constructor Details
-
AbstractInterceptorDrivenBeanDefinitionDecorator
public AbstractInterceptorDrivenBeanDefinitionDecorator()
-
-
Method Details
-
decorate
public final org.springframework.beans.factory.config.BeanDefinitionHolder decorate(Node node, org.springframework.beans.factory.config.BeanDefinitionHolder definitionHolder, org.springframework.beans.factory.xml.ParserContext parserContext) - Specified by:
decoratein interfaceorg.springframework.beans.factory.xml.BeanDefinitionDecorator
-
getInterceptorNameSuffix
protected String getInterceptorNameSuffix(org.springframework.beans.factory.config.BeanDefinition interceptorDefinition) -
createInterceptorDefinition
protected abstract org.springframework.beans.factory.config.BeanDefinition createInterceptorDefinition(Node node) Subclasses should implement this method to return theBeanDefinitionfor the interceptor they wish to apply to the bean being decorated.
-