Class ReadBodyRoutePredicateFactory
java.lang.Object
org.springframework.cloud.gateway.support.AbstractConfigurable<ReadBodyRoutePredicateFactory.Config>
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 ShortcutConfigurable
ShortcutConfigurable.GatewayBeanFactoryResolver, ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType -
Field Summary
FieldsFields inherited from interface 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 AbstractConfigurable
getConfigClass, newConfig, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface RoutePredicateFactory
apply, applyAsync, beforeApply, getConfigClass, name, newConfigMethods inherited from interface 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)
-