Package | Description |
---|---|
org.springframework.web.servlet.function |
Provides the types that make up Spring's functional web framework for Servlet environments.
|
Modifier and Type | Method and Description |
---|---|
static RequestPredicate |
RequestPredicates.accept(MediaType... mediaTypes)
Return a
RequestPredicate that tests if the request's
accept header is
compatible with any of the given media types. |
static RequestPredicate |
RequestPredicates.all()
Return a
RequestPredicate that always matches. |
default RequestPredicate |
RequestPredicate.and(RequestPredicate other)
Return a composed request predicate that tests against both this predicate AND
the
other predicate. |
static RequestPredicate |
RequestPredicates.contentType(MediaType... mediaTypes)
Return a
RequestPredicate that tests if the request's
content type is
included by any of the given media types. |
static RequestPredicate |
RequestPredicates.DELETE(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is DELETE
and the given pattern matches against the request path. |
static RequestPredicate |
RequestPredicates.GET(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is GET
and the given pattern matches against the request path. |
static RequestPredicate |
RequestPredicates.HEAD(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is HEAD
and the given pattern matches against the request path. |
static RequestPredicate |
RequestPredicates.headers(Predicate<ServerRequest.Headers> headersPredicate)
Return a
RequestPredicate that tests the request's headers
against the given headers predicate. |
static RequestPredicate |
RequestPredicates.method(HttpMethod httpMethod)
Return a
RequestPredicate that matches if the request's
HTTP method is equal to the given method. |
static RequestPredicate |
RequestPredicates.methods(HttpMethod... httpMethods)
Return a
RequestPredicate 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 |
RequestPredicates.OPTIONS(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is OPTIONS
and the given pattern matches against the request path. |
default RequestPredicate |
RequestPredicate.or(RequestPredicate other)
Return a composed request predicate that tests against both this predicate OR
the
other predicate. |
static RequestPredicate |
RequestPredicates.param(String name,
Predicate<String> predicate)
Return a
RequestPredicate that tests the request's parameter of the given name
against the given predicate. |
static RequestPredicate |
RequestPredicates.param(String name,
String value)
Return a
RequestPredicate that matches if the request's parameter of the given name
has the given value. |
static RequestPredicate |
RequestPredicates.PATCH(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is PATCH
and the given pattern matches against the request path. |
static RequestPredicate |
RequestPredicates.path(String pattern)
Return a
RequestPredicate that tests the request path
against the given path pattern. |
static RequestPredicate |
RequestPredicates.pathExtension(Predicate<String> extensionPredicate)
Return a
RequestPredicate that matches if the request's path matches the given
predicate. |
static RequestPredicate |
RequestPredicates.pathExtension(String extension)
Return a
RequestPredicate that matches if the request's path has the given extension. |
static RequestPredicate |
RequestPredicates.POST(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is POST
and the given pattern matches against the request path. |
static RequestPredicate |
RequestPredicates.PUT(String pattern)
Return a
RequestPredicate that matches if request's HTTP method is PUT
and the given pattern matches against the request path. |
Modifier and Type | Method and Description |
---|---|
static Function<String,RequestPredicate> |
RequestPredicates.pathPredicates(PathPatternParser patternParser)
Return a function that creates new path-matching
RequestPredicates
from pattern Strings using the given PathPatternParser . |
Modifier and Type | Method and Description |
---|---|
default RequestPredicate |
RequestPredicate.and(RequestPredicate other)
Return a composed request predicate that tests against both this predicate AND
the
other 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 |
RouterFunctions.Builder.DELETE(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
DELETE requests
that match the given pattern and predicate. |
void |
RouterFunctions.Visitor.endNested(RequestPredicate predicate)
Receive notification of the end of a nested router function.
|
RouterFunctions.Builder |
RouterFunctions.Builder.GET(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
GET requests
that match the given pattern and predicate. |
RouterFunctions.Builder |
RouterFunctions.Builder.HEAD(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
HEAD requests
that match the given pattern and predicate. |
RouterFunctions.Builder |
RouterFunctions.Builder.nest(RequestPredicate predicate,
Consumer<RouterFunctions.Builder> builderConsumer)
Route to a built router function if the given request predicate applies.
|
static <T extends ServerResponse> |
RouterFunctions.nest(RequestPredicate predicate,
RouterFunction<T> routerFunction)
Route to the given router function if the given request predicate applies.
|
RouterFunctions.Builder |
RouterFunctions.Builder.nest(RequestPredicate predicate,
Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier)
Route to the supplied router function if the given request predicate applies.
|
RouterFunctions.Builder |
RouterFunctions.Builder.OPTIONS(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
OPTIONS requests
that match the given pattern and predicate. |
default RequestPredicate |
RequestPredicate.or(RequestPredicate other)
Return a composed request predicate that tests against both this predicate OR
the
other predicate. |
RouterFunctions.Builder |
RouterFunctions.Builder.PATCH(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
PATCH requests
that match the given pattern and predicate. |
RouterFunctions.Builder |
RouterFunctions.Builder.POST(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
POST requests
that match the given pattern and predicate. |
RouterFunctions.Builder |
RouterFunctions.Builder.PUT(String pattern,
RequestPredicate predicate,
HandlerFunction<ServerResponse> handlerFunction)
Adds a route to the given handler function that handles all HTTP
PUT requests
that match the given pattern and predicate. |
void |
RouterFunctions.Visitor.route(RequestPredicate predicate,
HandlerFunction<?> handlerFunction)
Receive notification of a standard predicated route to a handler function.
|
RouterFunctions.Builder |
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> |
RouterFunctions.route(RequestPredicate predicate,
HandlerFunction<T> handlerFunction)
Route to the given handler function if the given request predicate applies.
|
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.
|