org.wanghy.cache.interceptor.flush
Class CacheFlushAttributeSourceAdvisor

java.lang.Object
  extended byorg.springframework.aop.support.StaticMethodMatcher
      extended byorg.springframework.aop.support.StaticMethodMatcherPointcut
          extended byorg.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
              extended byorg.wanghy.cache.interceptor.flush.CacheFlushAttributeSourceAdvisor
All Implemented Interfaces:
Advisor, MethodMatcher, Ordered, Pointcut, PointcutAdvisor, Serializable

public class CacheFlushAttributeSourceAdvisor
extends StaticMethodMatcherPointcutAdvisor

Advisor driven by a CacheFlushAttributeSource that points to CacheFlushInterceptor the methods that should be intercepted.

Version:
$Revision: 1.4 $ $Date: 2005/03/03 02:05:32 $
Author:
Alex Ruiz
See Also:
Serialized Form

Field Summary
private  CacheFlushAttributeSource cacheFlushAttributeSource
          Retrieves instances of FlushCache for intercepted methods.
private static long serialVersionUID
          Version number of this class.
 
Fields inherited from class org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
 
Fields inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut
 
Fields inherited from interface org.springframework.aop.Pointcut
TRUE
 
Fields inherited from interface org.springframework.aop.MethodMatcher
TRUE
 
Constructor Summary
CacheFlushAttributeSourceAdvisor(CacheFlushInterceptor cacheInterceptor)
          Constructor.
 
Method Summary
 boolean matches(Method method, Class targetClass)
          Returns true if the intercepted method should flush the cache.
 
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
 
Methods inherited from interface org.springframework.aop.Pointcut
 
Methods inherited from interface org.springframework.aop.MethodMatcher
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Version number of this class.

See Also:
Serializable, Constant Field Values

cacheFlushAttributeSource

private CacheFlushAttributeSource cacheFlushAttributeSource
Retrieves instances of FlushCache for intercepted methods.

Constructor Detail

CacheFlushAttributeSourceAdvisor

public CacheFlushAttributeSourceAdvisor(CacheFlushInterceptor cacheInterceptor)
Constructor.

Parameters:
cacheInterceptor - Advice that caches the returned values of intercepted methods.
Throws:
AopConfigException - if the CacheFlushAttributeSource of cacheInterceptor is null.
Method Detail

matches

public final boolean matches(Method method,
                             Class targetClass)
Returns true if the intercepted method should flush the cache.

Parameters:
method - the intercepted method to verify.
targetClass - the class declaring the method.
Returns:
true if the specified method should flush the cache.


Copyright © 2004-2005 Alex Ruiz. All Rights Reserved.