Package io.github.resilience4j.fallback
Class FallbackDecorators
- java.lang.Object
-
- io.github.resilience4j.fallback.FallbackDecorators
-
public class FallbackDecorators extends java.lang.ObjectFallbackDecoratorresolver
-
-
Constructor Summary
Constructors Constructor Description FallbackDecorators(java.util.List<FallbackDecorator> fallbackDecorators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vavr.CheckedFunction0<java.lang.Object>decorate(FallbackMethod fallbackMethod, io.vavr.CheckedFunction0<java.lang.Object> supplier)find aFallbackDecoratorby return type of theFallbackMethodand decorate supplierjava.util.List<FallbackDecorator>getFallbackDecorators()
-
-
-
Constructor Detail
-
FallbackDecorators
public FallbackDecorators(java.util.List<FallbackDecorator> fallbackDecorators)
-
-
Method Detail
-
decorate
public io.vavr.CheckedFunction0<java.lang.Object> decorate(FallbackMethod fallbackMethod, io.vavr.CheckedFunction0<java.lang.Object> supplier)
find aFallbackDecoratorby return type of theFallbackMethodand decorate supplier- Parameters:
fallbackMethod- fallback method that handles supplier's exceptionsupplier- original function- Returns:
- a function which is decorated by a
FallbackMethod
-
getFallbackDecorators
public java.util.List<FallbackDecorator> getFallbackDecorators()
-
-