RouterFunction using a discoverable builder-style API, to
create a RouterFunction
given a RequestPredicate and HandlerFunction, and to do further
subrouting on an existing routing
function.
Additionally, this class can transform
a RouterFunction into an HttpHandler, which can be run in Servlet
environments, Reactor, or Undertow.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract static class | |
| pack-priv static class | |
| public static interface | RouterFunctions.
Represents a discoverable builder for router functions. |
| private static class | |
| private static class | |
| pack-priv static class | RouterFunctions.
A composed routing function that first invokes one function, and then invokes another function (of a different response type) if this route had no result. |
| pack-priv static class | RouterFunctions.
the type of the handler function to filter T extends ServerResponse, the type of the response of the function S extends ServerResponse>Filter the specified handler functions with the given filter function. |
| private static class | |
| private static class | |
| private static class | |
| pack-priv static class | RouterFunctions.
the server response type T extends ServerResponse>A composed routing function that first invokes one function, and then invokes the
another function (of the same response type |
| public static interface | RouterFunctions.
Receives notifications from the logical structure of router functions. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Log | |
| public static final String | MATCHING_PATTERN_ATTRIBUTE
Name of the |
| public static final String | REQUEST_ATTRIBUTE
Name of the |
| public static final String | URI_TEMPLATE_VARIABLES_ATTRIBUTE
Name of the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < the type of response returned by the handler function T extends ServerResponse> RouterFunction | Returns: the change router functionthe router function to change the parser in routerFunction, PathPatternParser the parser to change to. parser)Changes the |
| public static < the type of response returned by the handler function T extends ServerResponse> RouterFunction | Returns: a router function that routes torouterFunction if
predicate evaluates to truethe predicate to test predicate, RouterFunction<T> the nested router function to delegate to if the predicate applies routerFunction)Route to the given router function if the given request predicate applies. |
| public static RouterFunction | Returns: a router function that routes to a resourcepredicate to match predicate, Resource the resources to serve resource)Route requests that match the given predicate to the given resource. |
| public static RouterFunction | Returns: a router function that routes to a resourcepredicate to match predicate, Resource the resources to serve resource, BiConsumer<Resource, HttpHeaders> provides access to the HTTP headers for served resources headersConsumer)Route requests that match the given predicate to the given resource. |
| public static Function | Returns: the default resource lookup function for the given parameters.the pattern to match pattern, Resource the location directory relative to which resources should be resolved location)Returns the resource lookup function used by |
| public static RouterFunction | |
| public static RouterFunction | Returns: a router function that routes to resourcesthe pattern to match pattern, Resource the location directory relative to which resources should be resolved location, BiConsumer<Resource, HttpHeaders> provides access to the HTTP headers for served resources headersConsumer)Route requests that match the given pattern to resources relative to the given root location. |
| public static RouterFunction | Returns: a router function that routes to resourcesthe function to provide a lookupFunction)Resource given the ServerRequestRoute to resources using the provided lookup function. |
| public static RouterFunction | Returns: a router function that routes to resourcesthe function to provide a lookupFunction, BiConsumer<Resource, HttpHeaders> Resource given the ServerRequestprovides access to the HTTP headers for served resources headersConsumer)Route to resources using the provided lookup function. |
| public static RouterFunctions. | Returns: a router function builderOffers a discoverable way to create router functions through a builder-style interface. |
| public static < the type of response returned by the handler function T extends ServerResponse> RouterFunction | Returns: a router function that routes tohandlerFunction if
predicate evaluates to truethe predicate to test predicate, HandlerFunction<T> the handler function to route to if the predicate applies handlerFunction)Route to the given handler function if the given request predicate applies. |
| public static HttpHandler | Returns: an HTTP handler that handles HTTP request using the given router functionthe router function to convert routerFunction)Convert the given router function into a |
| public static HttpHandler | Returns: an HTTP handler that handles HTTP request using the given router functionthe router function to convert routerFunction, HandlerStrategies the strategies to use strategies)Convert the given router function into a |
| public static WebHandler | Returns: a web handler that handles web request using the given router functionthe router function to convert routerFunction)Convert the given router function into a |
| public static WebHandler | Returns: a web handler that handles web request using the given router functionthe router function to convert routerFunction, HandlerStrategies the strategies to use strategies)Convert the given router function into a |