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 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)
          Return a list of Interceptor and InterceptorAndDynamicMethodMatcher.
 
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
Return a list of Interceptor and InterceptorAndDynamicMethodMatcher.

Specified by:
getInterceptorsAndDynamicInterceptionAdvice in interface AdvisorChainFactory

activated

public void activated(AdvisedSupport advisedSupport)
Description copied from interface: AdvisedSupportListener
Invoked when 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-2005 The Spring Framework Project.