Class CircuitBreakerRuleChangeListener
java.lang.Object
com.alibaba.cloud.circuitbreaker.sentinel.feign.CircuitBreakerRuleChangeListener
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent>
public class CircuitBreakerRuleChangeListener
extends Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent>, org.springframework.beans.factory.SmartInitializingSingleton
Sentinel circuit breaker config change listener.
- Since:
- 2021.0.1.0
- Author:
- freeman
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidconfigureCustom(SentinelFeignClientProperties properties, org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory factory) static voidconfigureDefault(SentinelFeignClientProperties properties, org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory factory) static MapgetConfigurations(org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory circuitBreakerFactory) voidonApplicationEvent(org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
CircuitBreakerRuleChangeListener
public CircuitBreakerRuleChangeListener()
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent>
-
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
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
configureCustom
public static void configureCustom(SentinelFeignClientProperties properties, org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory factory) -
configureDefault
public static void configureDefault(SentinelFeignClientProperties properties, org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory factory) -
getConfigurations
public static Map getConfigurations(org.springframework.cloud.client.circuitbreaker.AbstractCircuitBreakerFactory circuitBreakerFactory)
-