|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor
public final class ThrowsAdviceInterceptor
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.
You can, however, use this class to wrap Spring ThrowsAdvice
implementations for use in other AOP frameworks supporting the AOP Alliance
interfaces.
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 |
---|
public ThrowsAdviceInterceptor(Object throwsAdvice)
throwsAdvice
- the advice object that defines the exception
handler methods (usually a ThrowsAdvice implementation)ThrowsAdvice
Method Detail |
---|
public int getHandlerMethodCount()
public Object invoke(MethodInvocation mi) throws Throwable
invoke
in interface MethodInterceptor
Throwable
MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |