Class CircuitBreakerRestClientHttpServiceGroupConfigurer
java.lang.Object
org.springframework.cloud.client.circuitbreaker.httpservice.CircuitBreakerRestClientHttpServiceGroupConfigurer
- All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.client.support.RestClientHttpServiceGroupConfigurer, org.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.client.RestClient.Builder>
public class CircuitBreakerRestClientHttpServiceGroupConfigurer
extends Object
implements org.springframework.web.client.support.RestClientHttpServiceGroupConfigurer, org.springframework.context.ApplicationContextAware
An implementation of
RestClientHttpServiceGroupConfigurer that provides
CircuitBreaker integration for configured groups. This configurer applies
CircuitBreaker logic to each HTTP service group and provides fallback behavior based on
the HttpServiceFallback annotations configured by the user.- Since:
- 5.0.0
- Author:
- Olga Maciaszek-Sharma
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.web.service.registry.HttpServiceGroupConfigurer
org.springframework.web.service.registry.HttpServiceGroupConfigurer.ClientCallback<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.GroupCallback<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.InitializingClientCallback<CB>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.ProxyFactoryCallback -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCircuitBreakerRestClientHttpServiceGroupConfigurer(CircuitBreakerFactory<?, ?> circuitBreakerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureGroups(org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<org.springframework.web.client.RestClient.Builder> groups) intgetOrder()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
CircuitBreakerRestClientHttpServiceGroupConfigurer
public CircuitBreakerRestClientHttpServiceGroupConfigurer(CircuitBreakerFactory<?, ?> circuitBreakerFactory)
-
-
Method Details
-
configureGroups
public void configureGroups(org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<org.springframework.web.client.RestClient.Builder> groups) - Specified by:
configureGroupsin interfaceorg.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.client.RestClient.Builder>
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.client.RestClient.Builder>- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-