public static final class FeignDecorators.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
FeignDecorators |
build()
Builds the decorator chain.
|
FeignDecorators.Builder |
withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)
Adds a
Bulkhead to the decorator chain. |
FeignDecorators.Builder |
withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
Adds a
CircuitBreaker to the decorator chain. |
FeignDecorators.Builder |
withFallback(java.lang.Object fallback)
Adds a fallback to the decorator chain.
|
FeignDecorators.Builder |
withFallback(java.lang.Object fallback,
java.lang.Class<? extends java.lang.Exception> filter)
Adds a fallback to the decorator chain.
|
FeignDecorators.Builder |
withFallback(java.lang.Object fallback,
java.util.function.Predicate<java.lang.Exception> filter)
Adds a fallback to the decorator chain.
|
FeignDecorators.Builder |
withFallbackFactory(java.util.function.Function<java.lang.Exception,?> fallbackFactory)
Adds a fallback factory to the decorator chain.
|
FeignDecorators.Builder |
withFallbackFactory(java.util.function.Function<java.lang.Exception,?> fallbackFactory,
java.lang.Class<? extends java.lang.Exception> filter)
Adds a fallback factory to the decorator chain.
|
FeignDecorators.Builder |
withFallbackFactory(java.util.function.Function<java.lang.Exception,?> fallbackFactory,
java.util.function.Predicate<java.lang.Exception> filter)
Adds a fallback to the decorator chain.
|
FeignDecorators.Builder |
withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)
Adds a
RateLimiter to the decorator chain. |
FeignDecorators.Builder |
withRetry(io.github.resilience4j.retry.Retry retry)
Adds a
Retry to the decorator chain. |
public FeignDecorators.Builder withRetry(io.github.resilience4j.retry.Retry retry)
Retry to the decorator chain.retry - a fully configured Retry.public FeignDecorators.Builder withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
CircuitBreaker to the decorator chain.circuitBreaker - a fully configured CircuitBreaker.public FeignDecorators.Builder withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)
RateLimiter to the decorator chain.rateLimiter - a fully configured RateLimiter.public FeignDecorators.Builder withFallback(java.lang.Object fallback)
fallback - must match the feign interface, i.e. the interface specified when calling
Feign.Builder.target(Class, String).public FeignDecorators.Builder withFallbackFactory(java.util.function.Function<java.lang.Exception,?> fallbackFactory)
fallbackFactory - must match the feign interface, i.e. the interface specified when
calling Feign.Builder.target(Class, String).public FeignDecorators.Builder withFallback(java.lang.Object fallback, java.lang.Class<? extends java.lang.Exception> filter)
fallback - must match the feign interface, i.e. the interface specified when calling
Feign.Builder.target(Class, String).filter - only Exceptions matching the specified Exception will
trigger the fallback.public FeignDecorators.Builder withFallbackFactory(java.util.function.Function<java.lang.Exception,?> fallbackFactory, java.lang.Class<? extends java.lang.Exception> filter)
fallbackFactory - must match the feign interface, i.e. the interface specified when
calling Feign.Builder.target(Class, String).filter - only Exceptions matching the specified Exception
will trigger the fallback.public FeignDecorators.Builder withFallback(java.lang.Object fallback, java.util.function.Predicate<java.lang.Exception> filter)
fallback - must match the feign interface, i.e. the interface specified when calling
Feign.Builder.target(Class, String).filter - the filter must return true for the fallback to be called.public FeignDecorators.Builder withFallbackFactory(java.util.function.Function<java.lang.Exception,?> fallbackFactory, java.util.function.Predicate<java.lang.Exception> filter)
fallbackFactory - must match the feign interface, i.e. the interface specified when
calling Feign.Builder.target(Class, String).filter - the filter must return true for the fallback to be
called.public FeignDecorators.Builder withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)
Bulkhead to the decorator chain.bulkhead - a fully configured Bulkhead.public FeignDecorators build()
Resilience4jFeign.