CircuitBreakerClient extends AbstractCircuitBreakerClient<HttpRequest, HttpResponse> implements HttpClient { public static CircuitBreakerClientBuilder builder(CircuitBreakerRule rule) { return new CircuitBreakerClientBuilder(rule); } CircuitBreakerClient(HttpClient delegate, CircuitBreakerMapping mapping, CircuitBreakerRule rule);   CircuitBreakerClient(HttpClient delegate, CircuitBreakerMapping mapping,
                         CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent);   CircuitBreakerClient(HttpClient delegate, CircuitBreakerMapping mapping,
                         CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent, int maxContentLength); static Function<? super HttpClient, CircuitBreakerClient> newDecorator(CircuitBreaker circuitBreaker, CircuitBreakerRule rule); static Function<? super HttpClient, CircuitBreakerClient> newDecorator(CircuitBreaker circuitBreaker, CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent); static Function<? super HttpClient, CircuitBreakerClient> newDecorator(CircuitBreakerMapping mapping, CircuitBreakerRule rule); static Function<? super HttpClient, CircuitBreakerClient> newDecorator(CircuitBreakerMapping mapping, CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent); static Function<? super HttpClient, CircuitBreakerClient> newPerMethodDecorator(Function<String, ? extends CircuitBreaker> factory, CircuitBreakerRule rule); static Function<? super HttpClient, CircuitBreakerClient> newPerMethodDecorator(Function<String, ? extends CircuitBreaker> factory,
                          CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent); static Function<? super HttpClient, CircuitBreakerClient> newPerHostDecorator(Function<String, ? extends CircuitBreaker> factory, CircuitBreakerRule rule); static Function<? super HttpClient, CircuitBreakerClient> newPerHostDecorator(Function<String, ? extends CircuitBreaker> factory,
                        CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent); static Function<? super HttpClient, CircuitBreakerClient> newPerHostAndMethodDecorator(BiFunction<String, String, ? extends CircuitBreaker> factory,
                                 CircuitBreakerRule rule); static Function<? super HttpClient, CircuitBreakerClient> newPerHostAndMethodDecorator(BiFunction<String, String, ? extends CircuitBreaker> factory,
                                 CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent); static CircuitBreakerClientBuilder builder(CircuitBreakerRule rule); static CircuitBreakerClientBuilder builder(
            CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent); static CircuitBreakerClientBuilder builder(
            CircuitBreakerRuleWithContent<HttpResponse> ruleWithContent, int maxContentLength);  }
@Test void ruleWithoutContent() { final CircuitBreakerRule rule = CircuitBreakerRule.onServerErrorStatus(); circuitBreakerIsOpenOnServerError(CircuitBreakerClient.builder(rule)); }
@Test void ruleWithContent() { final CircuitBreakerRuleWithContent<HttpResponse> rule = CircuitBreakerRuleWithContent.<HttpResponse>builder().onServerErrorStatus().thenFailure(); circuitBreakerIsOpenOnServerError(CircuitBreakerClient.builder(rule, 10000)); }