@FunctionalInterface public interface RequestPredicate
Request
.
Instances of this function that evaluate on common request properties can be found in RequestPredicates
.RequestPredicates
,
RouterFunctions.route(RequestPredicate, HandlerFunction)
,
RouterFunctions.subroute(RequestPredicate, RouterFunction)
Modifier and Type | Method and Description |
---|---|
default RequestPredicate |
and(RequestPredicate other)
Returns a composed request predicate that tests against both this predicate AND the
other predicate. |
default RequestPredicate |
negate()
Return a predicate that represents the logical negation of this predicate.
|
default RequestPredicate |
or(RequestPredicate other)
Returns a composed request predicate that tests against both this predicate OR the
other predicate. |
default Request |
subRequest(Request request) |
boolean |
test(Request request)
Evaluates this predicate on the given request.
|
boolean test(Request request)
request
- the request to match againsttrue
if the request matches the predicate; false
otherwisedefault RequestPredicate and(RequestPredicate other)
other
predicate.
When evaluating the composed predicate, if this predicate is false
, then the other
predicate is not evaluated.other
- a predicate that will be logically-ANDed with this predicateother
predicatedefault RequestPredicate negate()
default RequestPredicate or(RequestPredicate other)
other
predicate.
When evaluating the composed predicate, if this predicate is true
, then the other
predicate
is not evaluated.other
- a predicate that will be logically-ORed with this predicateother
predicate