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 ClassesNested classes/interfaces inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType -
Field Summary
FieldsFields inherited from interface org.springframework.cloud.gateway.handler.predicate.RoutePredicateFactory
PATTERN_KEY -
Constructor Summary
ConstructorsConstructorDescriptionReadBodyRoutePredicateFactory(List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders) -
Method Summary
Modifier and TypeMethodDescriptionPredicate<org.springframework.web.server.ServerWebExchange>AsyncPredicate<org.springframework.web.server.ServerWebExchange>Methods inherited from class org.springframework.cloud.gateway.support.AbstractConfigurable
getConfigClass, newConfig, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.cloud.gateway.handler.predicate.RoutePredicateFactory
apply, applyAsync, beforeApply, getConfigClass, name, newConfigMethods inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
shortcutFieldOrder, shortcutFieldPrefix, shortcutType
-
Field Details
-
log
protected static final org.apache.commons.logging.Log log
-
-
Constructor Details
-
ReadBodyRoutePredicateFactory
public ReadBodyRoutePredicateFactory() -
ReadBodyRoutePredicateFactory
public ReadBodyRoutePredicateFactory(List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders)
-
-
Method Details
-
applyAsync
public AsyncPredicate<org.springframework.web.server.ServerWebExchange> applyAsync(ReadBodyRoutePredicateFactory.Config config) -
apply
public Predicate<org.springframework.web.server.ServerWebExchange> apply(ReadBodyRoutePredicateFactory.Config config)
-