Class 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 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:
        getOrder in interface org.springframework.core.Ordered
        Specified by:
        getOrder in interface org.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:
        supportsEventType in interface org.springframework.context.event.SmartApplicationListener
      • supportsSourceType

        public boolean supportsSourceType​(Class<?> sourceType)
        Specified by:
        supportsSourceType in interface org.springframework.context.event.SmartApplicationListener
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
      • filter

        public reactor.core.publisher.Mono<Void> filter​(org.springframework.web.server.ServerWebExchange exchange,
                                                        org.springframework.web.server.WebFilterChain chain)
        Specified by:
        filter in interface org.springframework.web.server.WebFilter