Class ReadBodyRoutePredicateFactory
- java.lang.Object
-
- org.springframework.cloud.gateway.support.AbstractConfigurable<C>
-
- org.springframework.cloud.gateway.handler.predicate.AbstractRoutePredicateFactory<ReadBodyRoutePredicateFactory.Config>
-
- org.springframework.cloud.gateway.handler.predicate.ReadBodyRoutePredicateFactory
-
- All Implemented Interfaces:
RoutePredicateFactory<ReadBodyRoutePredicateFactory.Config>,Configurable<ReadBodyRoutePredicateFactory.Config>,ShortcutConfigurable
public class ReadBodyRoutePredicateFactory extends AbstractRoutePredicateFactory<ReadBodyRoutePredicateFactory.Config>
Predicate that reads the body and applies a user provided predicate to run on the body. The body is cached in memory so that possible subsequent calls to the predicate do not need to deserialize again.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReadBodyRoutePredicateFactory.Config-
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 protected static org.apache.commons.logging.Loglog-
Fields inherited from interface org.springframework.cloud.gateway.handler.predicate.RoutePredicateFactory
PATTERN_KEY
-
-
Constructor Summary
Constructors Constructor Description ReadBodyRoutePredicateFactory()ReadBodyRoutePredicateFactory(List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<org.springframework.web.server.ServerWebExchange>apply(ReadBodyRoutePredicateFactory.Config config)AsyncPredicate<org.springframework.web.server.ServerWebExchange>applyAsync(ReadBodyRoutePredicateFactory.Config config)-
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, beforeApply, getConfigClass, name, newConfig
-
Methods inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
shortcutFieldOrder, shortcutFieldPrefix, shortcutType
-
-
-
-
Constructor Detail
-
ReadBodyRoutePredicateFactory
public ReadBodyRoutePredicateFactory()
-
ReadBodyRoutePredicateFactory
public ReadBodyRoutePredicateFactory(List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders)
-
-
Method Detail
-
applyAsync
public AsyncPredicate<org.springframework.web.server.ServerWebExchange> applyAsync(ReadBodyRoutePredicateFactory.Config config)
-
apply
public Predicate<org.springframework.web.server.ServerWebExchange> apply(ReadBodyRoutePredicateFactory.Config config)
-
-