org.springframework.aop.framework.adapter
Class AfterReturningAdviceAdapter

java.lang.Object
  extended by org.springframework.aop.framework.adapter.AfterReturningAdviceAdapter
All Implemented Interfaces:
java.io.Serializable, AdvisorAdapter

 class AfterReturningAdviceAdapter
extends java.lang.Object
implements AdvisorAdapter, java.io.Serializable

Adapter to enable AfterReturningAdvice to be used in the Spring AOP framework.

Author:
Rod Johnson, Juergen Hoeller

Constructor Summary
AfterReturningAdviceAdapter()
           
 
Method Summary
 MethodInterceptor getInterceptor(Advisor advisor)
          Return an AOP Alliance MethodInterceptor exposing the behavior of the given advice to an interception-based AOP framework.
 boolean supportsAdvice(Advice advice)
          Does this adapter understand this advice object? Is it valid to invoke the getInterceptors method with an Advisor that contains this advice as an argument?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AfterReturningAdviceAdapter

AfterReturningAdviceAdapter()
Method Detail

supportsAdvice

public boolean supportsAdvice(Advice advice)
Description copied from interface: AdvisorAdapter
Does this adapter understand this advice object? Is it valid to invoke the getInterceptors method with an Advisor that contains this advice as an argument?

Specified by:
supportsAdvice in interface AdvisorAdapter
Parameters:
advice - an Advice such as a BeforeAdvice
Returns:
whether this adapter understands the given advice object
See Also:
AdvisorAdapter.getInterceptor(org.springframework.aop.Advisor), BeforeAdvice

getInterceptor

public MethodInterceptor getInterceptor(Advisor advisor)
Description copied from interface: AdvisorAdapter
Return an AOP Alliance MethodInterceptor exposing the behavior of the given advice to an interception-based AOP framework.

Don't worry about any Pointcut contained in the Advisor; the AOP framework will take care of checking the pointcut.

Specified by:
getInterceptor in interface AdvisorAdapter
Parameters:
advisor - the Advisor. The supportsAdvice() method must have returned true on this object
Returns:
an AOP Alliance interceptor for this Advisor. There's no need to cache instances for efficiency, as the AOP framework caches advice chains.