Class WeightCalculatorWebFilter
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter
-
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>,org.springframework.context.event.SmartApplicationListener,org.springframework.core.Ordered,org.springframework.web.server.WebFilter
public class WeightCalculatorWebFilter extends Object implements org.springframework.web.server.WebFilter, org.springframework.core.Ordered, org.springframework.context.event.SmartApplicationListener
- Author:
- Spencer Gibb, Alexey Nakidkin
-
-
Field Summary
Fields Modifier and Type Field Description static intWEIGHT_CALC_FILTER_ORDEROrder of Weight Calculator Web filter.
-
Constructor Summary
Constructors Constructor Description WeightCalculatorWebFilter(org.springframework.beans.factory.ObjectProvider<RouteLocator> routeLocator, ConfigurationService configurationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>filter(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain)intgetOrder()voidhandle(PredicateArgsEvent event)voidonApplicationEvent(org.springframework.context.ApplicationEvent event)voidsetOrder(int order)voidsetRandom(Random random)booleansupportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)booleansupportsSourceType(Class<?> sourceType)
-
-
-
Field Detail
-
WEIGHT_CALC_FILTER_ORDER
public static final int WEIGHT_CALC_FILTER_ORDER
Order of Weight Calculator Web filter.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WeightCalculatorWebFilter
public WeightCalculatorWebFilter(org.springframework.beans.factory.ObjectProvider<RouteLocator> routeLocator, ConfigurationService configurationService)
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Specified by:
getOrderin interfaceorg.springframework.context.event.SmartApplicationListener
-
setOrder
public void setOrder(int order)
-
setRandom
public void setRandom(Random random)
-
supportsEventType
public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)
- Specified by:
supportsEventTypein interfaceorg.springframework.context.event.SmartApplicationListener
-
supportsSourceType
public boolean supportsSourceType(Class<?> sourceType)
- Specified by:
supportsSourceTypein interfaceorg.springframework.context.event.SmartApplicationListener
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
-
handle
public void handle(PredicateArgsEvent event)
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain)
- Specified by:
filterin interfaceorg.springframework.web.server.WebFilter
-
-