Class WeightRoutePredicateFactory
- java.lang.Object
-
- org.springframework.cloud.gateway.support.AbstractConfigurable<C>
-
- org.springframework.cloud.gateway.handler.predicate.AbstractRoutePredicateFactory<WeightConfig>
-
- org.springframework.cloud.gateway.handler.predicate.WeightRoutePredicateFactory
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,RoutePredicateFactory<WeightConfig>,Configurable<WeightConfig>,ShortcutConfigurable,org.springframework.context.ApplicationEventPublisherAware
public class WeightRoutePredicateFactory extends AbstractRoutePredicateFactory<WeightConfig> implements org.springframework.context.ApplicationEventPublisherAware
- Author:
- Spencer Gibb
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType
-
-
Field Summary
Fields Modifier and Type Field Description static StringGROUP_KEYWeight config group key.static StringWEIGHT_KEYWeight config weight key.-
Fields inherited from interface org.springframework.cloud.gateway.handler.predicate.RoutePredicateFactory
PATTERN_KEY
-
-
Constructor Summary
Constructors Constructor Description WeightRoutePredicateFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<org.springframework.web.server.ServerWebExchange>apply(WeightConfig config)voidbeforeApply(WeightConfig config)voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)List<String>shortcutFieldOrder()Returns hints about the number of args and the order for shortcut parsing.StringshortcutFieldPrefix()-
Methods inherited from class org.springframework.cloud.gateway.support.AbstractConfigurable
getConfigClass, newConfig, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.gateway.handler.predicate.RoutePredicateFactory
apply, applyAsync, applyAsync, getConfigClass, name, newConfig
-
Methods inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
shortcutType
-
-
-
-
Field Detail
-
GROUP_KEY
public static final String GROUP_KEY
Weight config group key.- See Also:
- Constant Field Values
-
WEIGHT_KEY
public static final String WEIGHT_KEY
Weight config weight key.- See Also:
- Constant Field Values
-
-
Method Detail
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
- Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
shortcutFieldOrder
public List<String> shortcutFieldOrder()
Description copied from interface:ShortcutConfigurableReturns hints about the number of args and the order for shortcut parsing.- Specified by:
shortcutFieldOrderin interfaceShortcutConfigurable- Returns:
- the list of hints
-
shortcutFieldPrefix
public String shortcutFieldPrefix()
- Specified by:
shortcutFieldPrefixin interfaceShortcutConfigurable
-
beforeApply
public void beforeApply(WeightConfig config)
- Specified by:
beforeApplyin interfaceRoutePredicateFactory<WeightConfig>
-
apply
public Predicate<org.springframework.web.server.ServerWebExchange> apply(WeightConfig config)
- Specified by:
applyin interfaceRoutePredicateFactory<WeightConfig>
-
-