|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
public abstract class AbstractExceptionHandler
This class provides a logging setup that allows to use the target's log as well as the exception handler's.
Constructor Summary | |
---|---|
AbstractExceptionHandler()
|
Method Summary | |
---|---|
protected String |
getInvocationDescription(org.aopalliance.intercept.MethodInvocation invocation)
Pretty-prints the invocation. |
Object |
handleException(Throwable t,
AbstractExceptionHandlerInterceptor exceptionInvoker,
org.aopalliance.intercept.MethodInvocation invocation)
Handles the given exception that occurred in the invocation of the given MethodInvocation . |
protected abstract Object |
handleException(Throwable t,
AbstractExceptionHandlerInterceptor exceptionInvoker,
org.aopalliance.intercept.MethodInvocation invocation,
org.slf4j.Logger logger)
Handles the given throwable thrown by the method invocation. |
void |
setUseDynamicLogger(boolean useDyanmicLog)
Sets whether the dynamic logger which is the one of the target class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractExceptionHandler()
Method Detail |
---|
public void setUseDynamicLogger(boolean useDyanmicLog)
useDyanmicLog
- If true
the target class' logger will be used or
the one of the concrete exception handler otherwise.public Object handleException(Throwable t, AbstractExceptionHandlerInterceptor exceptionInvoker, org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
MethodInvocation
.
handleException
in interface ExceptionHandler
t
- The throwable to handle.exceptionInvoker
- The exception invoker that called this exception handler.invocation
- The invocation which has resulted in the given throwable.
RetryException
- Signals that the complete invocation has to be rerun.
Throwable
- Any exception thrown by the handler.protected abstract Object handleException(Throwable t, AbstractExceptionHandlerInterceptor exceptionInvoker, org.aopalliance.intercept.MethodInvocation invocation, org.slf4j.Logger logger) throws Throwable
t
- The exception thrown in the method invocation.exceptionInvoker
- The exception invoker that called this exception handler.invocation
- The original method invocation.logger
- The logger to be used by subclasses.
Throwable
- Any exception thrown by the handler.protected String getInvocationDescription(org.aopalliance.intercept.MethodInvocation invocation)
invocation
- The called method invocation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |