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

TransactionAttributeSourceAdvisor (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.transaction.interceptor
Class TransactionAttributeSourceAdvisor

java.lang.Object
  extended by org.springframework.aop.support.StaticMethodMatcher
      extended by org.springframework.aop.support.StaticMethodMatcherPointcut
          extended by org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
              extended by org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor
All Implemented Interfaces:
Serializable, Advisor, MethodMatcher, Pointcut, PointcutAdvisor, Ordered

public class TransactionAttributeSourceAdvisor
extends StaticMethodMatcherPointcutAdvisor

Advisor driven by a TransactionAttributeSource, used to exclude a TransactionInterceptor from methods that are non-transactional.

Because the AOP framework caches advice calculations, this is normally faster than just letting the TransactionInterceptor run and find out itself that it has no work to do.

Author:
Rod Johnson, Juergen Hoeller
See Also:
TransactionInterceptor, TransactionProxyFactoryBean, Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.aop.Pointcut
TRUE
 
Fields inherited from interface org.springframework.aop.MethodMatcher
TRUE
 
Constructor Summary
TransactionAttributeSourceAdvisor()
          Create a new TransactionAttributeSourceAdvisor.
TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
          Create a new TransactionAttributeSourceAdvisor.
 
Method Summary
 boolean matches(Method method, Class targetClass)
          Perform static checking whether the given method matches.
 void setTransactionInterceptor(TransactionInterceptor interceptor)
          Set the transaction interceptor to use for this advisor.
 
Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
getAdvice, getOrder, getPointcut, isPerInstance, setAdvice, setOrder
 
Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut
getClassFilter, getMethodMatcher, setClassFilter
 
Methods inherited from class org.springframework.aop.support.StaticMethodMatcher
isRuntime, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionAttributeSourceAdvisor

public TransactionAttributeSourceAdvisor()
Create a new TransactionAttributeSourceAdvisor.


TransactionAttributeSourceAdvisor

public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
Create a new TransactionAttributeSourceAdvisor.

Parameters:
interceptor - the transaction interceptor to use for this advisor
Method Detail

setTransactionInterceptor

public void setTransactionInterceptor(TransactionInterceptor interceptor)
Set the transaction interceptor to use for this advisor.


matches

public boolean matches(Method method,
                       Class targetClass)
Description copied from interface: MethodMatcher
Perform static checking whether the given method matches. If this returns false or if the MethodMatcher.isRuntime() method returns false, no runtime check (i.e. no. MethodMatcher.matches(java.lang.reflect.Method, Class, Object[]) call) will be made.

Parameters:
method - the candidate method
targetClass - the target class (may be null, in which case the candidate class must be taken to be the method's declaring class)
Returns:
whether or not this method matches statically


Copyright (c) 2002-2007 The Spring Framework Project.