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

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


org.springframework.aop.framework
Class HashMapCachingAdvisorChainFactory

java.lang.Object
  extended by org.springframework.aop.framework.HashMapCachingAdvisorChainFactory
All Implemented Interfaces:
AdvisedSupportListener, AdvisorChainFactory

public final class HashMapCachingAdvisorChainFactory
extends Object
implements AdvisorChainFactory

AdvisorChainFactory implementation that caches by method.

Uses IdentityHashMap on JDK 1.4+ or Commons Collections 3.x IdentityMap (if available), which skip expensive Method.hashCode() calls. Falls back to standard HashMap on plain JDK 1.3.

Author:
Rod Johnson, Juergen Hoeller
See Also:
CollectionFactory.createIdentityMapIfPossible(int), Method.hashCode()

Constructor Summary
HashMapCachingAdvisorChainFactory()
           
 
Method Summary
 void activated(AdvisedSupport advisedSupport)
          Invoked when the first proxy is created.
 void adviceChanged(AdvisedSupport advisedSupport)
          Invoked when advice is changed after a proxy is created.
 List getInterceptorsAndDynamicInterceptionAdvice(Advised config, Object proxy, Method method, Class targetClass)
          Determine a list of MethodInterceptor and InterceptorAndDynamicMethodMatcher elements (using the latter if there is a dynamic method matcher that needs evaluation at runtime)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMapCachingAdvisorChainFactory

public HashMapCachingAdvisorChainFactory()
Method Detail

getInterceptorsAndDynamicInterceptionAdvice

public List getInterceptorsAndDynamicInterceptionAdvice(Advised config,
                                                        Object proxy,
                                                        Method method,
                                                        Class targetClass)
Description copied from interface: AdvisorChainFactory
Determine a list of MethodInterceptor and InterceptorAndDynamicMethodMatcher elements (using the latter if there is a dynamic method matcher that needs evaluation at runtime)

Specified by:
getInterceptorsAndDynamicInterceptionAdvice in interface AdvisorChainFactory
Parameters:
config - the AOP configuration in the form of an Advised obkect
proxy - the proxy object
method - the proxied method
targetClass - the target class
See Also:
AdvisorChainFactoryUtils.calculateInterceptorsAndDynamicInterceptionAdvice(org.springframework.aop.framework.Advised, java.lang.Object, java.lang.reflect.Method, java.lang.Class)

activated

public void activated(AdvisedSupport advisedSupport)
Description copied from interface: AdvisedSupportListener
Invoked when the first proxy is created.

Specified by:
activated in interface AdvisedSupportListener
Parameters:
advisedSupport - the AdvisedSupport object

adviceChanged

public void adviceChanged(AdvisedSupport advisedSupport)
Description copied from interface: AdvisedSupportListener
Invoked when advice is changed after a proxy is created.

Specified by:
adviceChanged in interface AdvisedSupportListener
Parameters:
advisedSupport - the AdvisedSupport object


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