Uses of Interface
org.springframework.web.servlet.function.RequestPredicate
Package
Description
Provides the types that make up Spring's functional web framework for Servlet environments.
-
Uses of RequestPredicate in org.springframework.web.servlet.function
Modifier and TypeMethodDescriptionstatic RequestPredicate
Return aRequestPredicate
that tests if the request's accept header is compatible with any of the given media types.static RequestPredicate
RequestPredicates.all()
Return aRequestPredicate
that always matches.default RequestPredicate
RequestPredicate.and
(RequestPredicate other) Return a composed request predicate that tests against both this predicate AND theother
predicate.static RequestPredicate
RequestPredicates.contentType
(MediaType... mediaTypes) Return aRequestPredicate
that tests if the request's content type is included by any of the given media types.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isDELETE
and the givenpattern
matches against the request path.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isGET
and the givenpattern
matches against the request path.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isHEAD
and the givenpattern
matches against the request path.static RequestPredicate
RequestPredicates.headers
(Predicate<ServerRequest.Headers> headersPredicate) Return aRequestPredicate
that tests the request's headers against the given headers predicate.static RequestPredicate
RequestPredicates.method
(HttpMethod httpMethod) Return aRequestPredicate
that matches if the request's HTTP method is equal to the given method.static RequestPredicate
RequestPredicates.methods
(HttpMethod... httpMethods) Return aRequestPredicate
that matches if the request's HTTP method is equal to one the of the given methods.default RequestPredicate
RequestPredicate.negate()
Return a predicate that represents the logical negation of this predicate.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isOPTIONS
and the givenpattern
matches against the request path.default RequestPredicate
RequestPredicate.or
(RequestPredicate other) Return a composed request predicate that tests against both this predicate OR theother
predicate.static RequestPredicate
Return aRequestPredicate
that matches if the request's parameter of the given name has the given value.static RequestPredicate
Return aRequestPredicate
that tests the request's parameter of the given name against the given predicate.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isPATCH
and the givenpattern
matches against the request path.static RequestPredicate
Return aRequestPredicate
that tests the request path against the given path pattern.static RequestPredicate
RequestPredicates.pathExtension
(String extension) Return aRequestPredicate
that matches if the request's path has the given extension.static RequestPredicate
RequestPredicates.pathExtension
(Predicate<String> extensionPredicate) Return aRequestPredicate
that matches if the request's path matches the given predicate.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isPOST
and the givenpattern
matches against the request path.static RequestPredicate
Return aRequestPredicate
that matches if request's HTTP method isPUT
and the givenpattern
matches against the request path.Modifier and TypeMethodDescriptionstatic Function<String,
RequestPredicate> RequestPredicates.pathPredicates
(PathPatternParser patternParser) Return a function that creates new path-matchingRequestPredicates
from pattern Strings using the givenPathPatternParser
.Modifier and TypeMethodDescriptiondefault RequestPredicate
RequestPredicate.and
(RequestPredicate other) Return a composed request predicate that tests against both this predicate AND theother
predicate.default RouterFunction<T>
RouterFunction.andNest
(RequestPredicate predicate, RouterFunction<T> routerFunction) Return a composed routing function that routes to the given router function if this route does not match and the given request predicate applies.default RouterFunction<T>
RouterFunction.andRoute
(RequestPredicate predicate, HandlerFunction<T> handlerFunction) Return a composed routing function that routes to the given handler function if this route does not match and the given request predicate applies.RouterFunctions.Builder.DELETE
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPDELETE
requests that match the given pattern and predicate.RouterFunctions.Builder.DELETE
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPDELETE
requests that match the given predicate.void
RouterFunctions.Visitor.endNested
(RequestPredicate predicate) Receive notification of the end of a nested router function.RouterFunctions.Builder.GET
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPGET
requests that match the given pattern and predicate.RouterFunctions.Builder.GET
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPGET
requests that match the given predicate.RouterFunctions.Builder.HEAD
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPHEAD
requests that match the given pattern and predicate.RouterFunctions.Builder.HEAD
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPHEAD
requests that match the given predicate.RouterFunctions.Builder.nest
(RequestPredicate predicate, Consumer<RouterFunctions.Builder> builderConsumer) Route to a built router function if the given request predicate applies.RouterFunctions.Builder.nest
(RequestPredicate predicate, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) Route to the supplied router function if the given request predicate applies.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions.nest
(RequestPredicate predicate, RouterFunction<T> routerFunction) Route to the given router function if the given request predicate applies.RouterFunctions.Builder.OPTIONS
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPOPTIONS
requests that match the given pattern and predicate.RouterFunctions.Builder.OPTIONS
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPOPTIONS
requests that match the given predicate.default RequestPredicate
RequestPredicate.or
(RequestPredicate other) Return a composed request predicate that tests against both this predicate OR theother
predicate.RouterFunctions.Builder.PATCH
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPATCH
requests that match the given pattern and predicate.RouterFunctions.Builder.PATCH
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPATCH
requests that match the given predicate.RouterFunctions.Builder.POST
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPOST
requests that match the given pattern and predicate.RouterFunctions.Builder.POST
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPOST
requests that match the given predicate.RouterFunctions.Builder.PUT
(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPUT
requests that match the given pattern and predicate.RouterFunctions.Builder.PUT
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPUT
requests that match the given predicate.RouterFunctions.Builder.route
(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all requests that match the given predicate.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions.route
(RequestPredicate predicate, HandlerFunction<T> handlerFunction) Route to the given handler function if the given request predicate applies.void
RouterFunctions.Visitor.route
(RequestPredicate predicate, HandlerFunction<?> handlerFunction) Receive notification of a standard predicated route to a handler function.void
RouterFunctions.Visitor.startNested
(RequestPredicate predicate) Receive notification of the beginning of a nested router function.void
RequestPredicates.Visitor.unknown
(RequestPredicate predicate) Receive first notification of an unknown predicate.