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

TransactionAttributeSourceAdvisor (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.transaction.interceptor
Class TransactionAttributeSourceAdvisor

java.lang.Object
  extended by org.springframework.aop.support.AbstractPointcutAdvisor
      extended by org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor
All Implemented Interfaces:
Serializable, Advisor, PointcutAdvisor, Ordered

public class TransactionAttributeSourceAdvisor
extends AbstractPointcutAdvisor

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.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
TransactionAttributeSourceAdvisor()
          Create a new TransactionAttributeSourceAdvisor.
TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
          Create a new TransactionAttributeSourceAdvisor.
 
Method Summary
 Advice getAdvice()
          Return the advice part of this aspect.
 Pointcut getPointcut()
          Get the Pointcut that drives this advisor.
 void setClassFilter(ClassFilter classFilter)
          Set the ClassFilter to use for this pointcut.
 void setTransactionInterceptor(TransactionInterceptor interceptor)
          Set the transaction interceptor to use for this advisor.
 
Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, isPerInstance, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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.


setClassFilter

public void setClassFilter(ClassFilter classFilter)
Set the ClassFilter to use for this pointcut. Default is ClassFilter.TRUE.


getAdvice

public Advice getAdvice()
Description copied from interface: Advisor
Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.

Returns:
the advice that should apply if the pointcut matches
See Also:
MethodInterceptor, BeforeAdvice, ThrowsAdvice, AfterReturningAdvice

getPointcut

public Pointcut getPointcut()
Description copied from interface: PointcutAdvisor
Get the Pointcut that drives this advisor.


The Spring Framework

Copyright © 2002-2007 The Spring Framework.