站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

AopNamespaceHandler (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.aop.config
Class AopNamespaceHandler

java.lang.Object
  extended by org.springframework.beans.factory.xml.NamespaceHandlerSupport
      extended by org.springframework.aop.config.AopNamespaceHandler
All Implemented Interfaces:
NamespaceHandler

public class AopNamespaceHandler
extends NamespaceHandlerSupport

NamespaceHandler for the aop namespace.

Provides a BeanDefinitionParser for the <aop:config> tag. A config tag can include nested pointcut, advisor and aspect tags.

The pointcut tag allows for creation of named AspectJExpressionPointcut beans using a simple syntax:

 <aop:pointcut id="getNameCalls" expression="execution(* *..ITestBean.getName(..))"/>
 

Using the advisor tag you can configure an Advisor and have it applied to all relevant beans in you BeanFactory automatically. The advisor tag supports both in-line and referenced Pointcuts:

 <aop:advisor id="getAgeAdvisor"
     pointcut="execution(* *..ITestBean.getAge(..))"
     advice-ref="getAgeCounter"/>

 <aop:advisor id="getNameAdvisor"
     pointcut-ref="getNameCalls"
     advice-ref="getNameCounter"/>

Since:
2.0
Author:
Rob Harrop, Adrian Colyer, Rod Johnson

Constructor Summary
AopNamespaceHandler()
           
 
Method Summary
 void init()
          Register the BeanDefinitionParsers for the 'config', 'spring-configured', 'aspectj-autoproxy' and 'scoped-proxy' tags.
 
Methods inherited from class org.springframework.beans.factory.xml.NamespaceHandlerSupport
decorate, findDecoratorForNode, findParserForElement, parse, registerBeanDefinitionDecorator, registerBeanDefinitionDecoratorForAttribute, registerBeanDefinitionParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AopNamespaceHandler

public AopNamespaceHandler()
Method Detail

init

public void init()
Register the BeanDefinitionParsers for the 'config', 'spring-configured', 'aspectj-autoproxy' and 'scoped-proxy' tags.

See Also:
NamespaceHandlerSupport.registerBeanDefinitionParser(String, BeanDefinitionParser)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.