org.springframework.aop.framework.adapter
Class ThrowsAdviceInterceptor

java.lang.Object
  extended by org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor
All Implemented Interfaces:
Advice, Interceptor, MethodInterceptor

public final class ThrowsAdviceInterceptor
extends Object
implements MethodInterceptor

Interceptor to wrap an after throwing advice.

The signatures on handler methods on the throwsAdvice constructor argument must be of form:
void afterThrowing([Method], [args], [target], ThrowableSubclass);
Only the last argument is required.

This is a framework class that need not be used directly by Spring users.

You can, however, use this class to wrap Spring ThrowsAdvice implementations for use in other AOP frameworks supporting the AOP Alliance interfaces.

Author:
Rod Johnson

Constructor Summary
ThrowsAdviceInterceptor(Object throwsAdvice)
          Create a new ThrowsAdviceInterceptor for the given ThrowsAdvice.
 
Method Summary
 int getHandlerMethodCount()
           
 Object invoke(MethodInvocation mi)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowsAdviceInterceptor

public ThrowsAdviceInterceptor(Object throwsAdvice)
Create a new ThrowsAdviceInterceptor for the given ThrowsAdvice.

Parameters:
throwsAdvice - the advice object that defines the exception handler methods (usually a ThrowsAdvice implementation)
See Also:
ThrowsAdvice
Method Detail

getHandlerMethodCount

public int getHandlerMethodCount()

invoke

public Object invoke(MethodInvocation mi)
              throws Throwable
Specified by:
invoke in interface MethodInterceptor
Throws:
Throwable
See Also:
MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)


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