ch.elca.el4j.services.exceptionhandler.handler
Class RetryExceptionHandler
java.lang.Object
ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
ch.elca.el4j.services.exceptionhandler.handler.AbstractRetryExceptionHandler
ch.elca.el4j.services.exceptionhandler.handler.RetryExceptionHandler
- All Implemented Interfaces:
- ExceptionHandler
public class RetryExceptionHandler
- extends AbstractRetryExceptionHandler
This class implements an exception handler that tries to call the target
several times after waiting a configurable delay.
- Author:
- Andreas Bur (ABU)
- File-location:
- RetryExceptionHandler
- Last check-in date:
- 2009-08-04 15:35:01 +0200 (Di, 04. Aug 2009) by swismer for revision 3883
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RetryExceptionHandler
public RetryExceptionHandler()
setSleepMillis
public void setSleepMillis(int sleepMillis)
- Sets the amount of time in milli seconds between two successive
invocations.
- Parameters:
sleepMillis
- The time in milli seconds to wait.
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.
Copyright © 2005-2011 ELCA. All Rights Reserved.