ch.elca.el4j.services.exceptionhandler.handler
Class AbstractReconfigureExceptionHandler
java.lang.Object
ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
ch.elca.el4j.services.exceptionhandler.handler.AbstractRetryExceptionHandler
ch.elca.el4j.services.exceptionhandler.handler.AbstractReconfigureExceptionHandler
- All Implemented Interfaces:
- ExceptionHandler
public abstract class AbstractReconfigureExceptionHandler
- extends AbstractRetryExceptionHandler
This class simplifies the implementation of exception handlers that use
another implementation with the same semantic to fulfil the callers
invocation. This is achieved by reconfiguring the class that is advised by
this exception handler's interceptor.
- Author:
- Andreas Bur (ABU)
- See Also:
AbstractSwappableTargetExceptionHandler
- File-location:
- AbstractReconfigureExceptionHandler
- Last check-in date:
- 2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873
Method Summary |
protected abstract void |
reconfigure(Throwable t,
org.aopalliance.intercept.MethodInvocation invocation,
org.slf4j.Logger logger)
Subclasses have to reconfigure the advised target. |
protected Object |
retry(Throwable t,
AbstractExceptionHandlerInterceptor exceptionInvoker,
org.aopalliance.intercept.MethodInvocation invocation,
org.slf4j.Logger logger)
Creates a new retry exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractReconfigureExceptionHandler
public AbstractReconfigureExceptionHandler()
retry
protected Object retry(Throwable t,
AbstractExceptionHandlerInterceptor exceptionInvoker,
org.aopalliance.intercept.MethodInvocation invocation,
org.slf4j.Logger logger)
throws Throwable
- Creates a new retry exception. Subclasses may also do some other tasks
(e.g. waiting). This method is called only if the number of retires is
not already exceeded.
- Specified by:
retry
in class AbstractRetryExceptionHandler
- Parameters:
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.
- Returns:
- Returns an object that is treated as the original invocation's
return value.
- Throws:
Throwable
- Whenever something goes wrong.
reconfigure
protected abstract void reconfigure(Throwable t,
org.aopalliance.intercept.MethodInvocation invocation,
org.slf4j.Logger logger)
- Subclasses have to reconfigure the advised target.
- Parameters:
t
- The exception that caused this strategy. Subclasses may distinguish
between different exception types.invocation
- The original invocation that failed.logger
- The logger.
Copyright © 2005-2011 ELCA. All Rights Reserved.