Package io.atlassian.fugue.retry
Class ExceptionHandlers
- java.lang.Object
-
- io.atlassian.fugue.retry.ExceptionHandlers
-
public class ExceptionHandlers extends java.lang.ObjectProvides some standard implementations of various exception actions. This class is not instantiable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classExceptionHandlers.CompositeExceptionHandlerprivate static classExceptionHandlers.IgnoreExceptionHandler(package private) static classExceptionHandlers.LoggingExceptionHandler
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Modifier Constructor Description privateExceptionHandlers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExceptionHandlerchain(ExceptionHandler... handlers)Chain a series of ExceptionHandlers together to be executed subsequently; if one throws an exception, subsequent handlers will not be executed.static ExceptionHandlerignoreExceptionHandler()ignoreExceptionHandler.(package private) static org.slf4j.Loggerlogger()static ExceptionHandlerloggingExceptionHandler(org.slf4j.Logger logger)Retrieves anExceptionHandlerwhich will log exceptions passed in.
-
-
-
Method Detail
-
loggingExceptionHandler
public static ExceptionHandler loggingExceptionHandler(org.slf4j.Logger logger)
Retrieves anExceptionHandlerwhich will log exceptions passed in.- Parameters:
logger- the Logger to which exceptions will be logged; if it is null, a default Logger will be used. The default logger is the logger for the ExceptionHandlers class, but may change in future.- Returns:
- an
ExceptionHandlerwhich will log (at WARN level) exceptions passed in
-
ignoreExceptionHandler
public static ExceptionHandler ignoreExceptionHandler()
ignoreExceptionHandler.
- Returns:
- an
ExceptionHandlerwhich does nothing
-
chain
public static ExceptionHandler chain(ExceptionHandler... handlers)
Chain a series of ExceptionHandlers together to be executed subsequently; if one throws an exception, subsequent handlers will not be executed.- Parameters:
handlers- the chain ofhandlersto chain- Returns:
- an ExceptionHandler composing the supplied handlers
-
logger
static org.slf4j.Logger logger()
-
-