Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.aop.framework.adapter
Class ThrowsAdviceInterceptor

    java.lang.Object
      org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor

All Implemented Interfaces:
  org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, AfterAdvice

    public class ThrowsAdviceInterceptor

extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor, AfterAdvice

Interceptor to wrap an after-throwing advice.

The signatures on handler methods on the `ThrowsAdvice` implementation method argument must be of the form:
`void afterThrowing([Method, args, target], ThrowableSubclass);`

Only the last argument is required.

Some examples of valid methods would be:

    public void afterThrowing(Exception ex)

    public void afterThrowing(RemoteException)

    public void afterThrowing(Method method, Object[] args, Object target, Exception ex)

    public void afterThrowing(Method method, Object[] args, Object target, ServletException ex)

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

Author:
  Rod Johnson, Juergen Hoeller

Constructor Summary
`ThrowsAdviceInterceptor(java.lang.Object throwsAdvice)` Create a new ThrowsAdviceInterceptor for the given ThrowsAdvice.

Method Summary
`int` | `getHandlerMethodCount()`
`java.lang.Object` | `invoke(org.aopalliance.intercept.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(java.lang.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)

Method Detail

### getHandlerMethodCount

    public int getHandlerMethodCount()

### invoke

    public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi)
                            throws java.lang.Throwable

  Specified by:
    `invoke` in interface `org.aopalliance.intercept.MethodInterceptor`
  Throws:
    `java.lang.Throwable`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD