# Uses of Interface
org.springframework.web.servlet.function.RouterFunction

Packages that use RouterFunction
Package
Description
org.springframework.web.servlet.function
Provides the types that make up Spring's functional web framework for Servlet environments.
org.springframework.web.servlet.function.support
Classes supporting the `org.springframework.web.servlet.function` package.

## Uses of RouterFunction in org.springframework.web.servlet.function

Methods in org.springframework.web.servlet.function that return RouterFunction
Modifier and Type
Method
Description
`default RouterFunction<T>`
RouterFunction.`and(RouterFunction<T> other)`
Return a composed routing function that first invokes this function, and then invokes the `other` function (of the same response type `T`) if this route had no result.
`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<?>`
RouterFunction.`andOther(RouterFunction<?> other)`
Return a composed routing function that first invokes this function, and then invokes the `other` function (of a different response type) if this route had no result.
`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.
`RouterFunction<ServerResponse>`
RouterFunctions.Builder.`build()`
Builds the `RouterFunction`.
`static <T extends ServerResponse>
RouterFunction<T>`
RouterFunctions.`changeParser(RouterFunction<T> routerFunction, org.springframework.web.util.pattern.PathPatternParser parser)`
Changes the `PathPatternParser` on the given router function.
`default <S extends ServerResponse>
RouterFunction<S>`
RouterFunction.`filter(HandlerFilterFunction<T,S> filterFunction)`
Filter all handler functions routed by this function with the given filter function.
`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.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resource(RequestPredicate predicate, org.springframework.core.io.Resource resource)`
Route requests that match the given predicate to the given resource.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resource(RequestPredicate predicate, org.springframework.core.io.Resource resource, BiConsumer<org.springframework.core.io.Resource,org.springframework.http.HttpHeaders> headersConsumer)`
Route requests that match the given predicate to the given resource.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resources(String pattern, org.springframework.core.io.Resource location)`
Route requests that match the given pattern to resources relative to the given root location.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resources(String pattern, org.springframework.core.io.Resource location, BiConsumer<org.springframework.core.io.Resource,org.springframework.http.HttpHeaders> headersConsumer)`
Route requests that match the given pattern to resources relative to the given root location.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction)`
Route to resources using the provided lookup function.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction, BiConsumer<org.springframework.core.io.Resource,org.springframework.http.HttpHeaders> headersConsumer)`
Route to resources using the provided lookup function.
`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.
`default RouterFunction<T>`
RouterFunction.`withAttribute(String name, Object value)`
Return a new routing function with the given attribute.
`default RouterFunction<T>`
RouterFunction.`withAttributes(Consumer<Map<String,Object>> attributesConsumer)`
Return a new routing function with attributes manipulated with the given consumer.
Methods in org.springframework.web.servlet.function with parameters of type RouterFunction
Modifier and Type
Method
Description
`RouterFunctions.Builder`
RouterFunctions.Builder.`add(RouterFunction<ServerResponse> routerFunction)`
Adds the given route to this builder.
`default RouterFunction<T>`
RouterFunction.`and(RouterFunction<T> other)`
Return a composed routing function that first invokes this function, and then invokes the `other` function (of the same response type `T`) if this route had no result.
`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<?>`
RouterFunction.`andOther(RouterFunction<?> other)`
Return a composed routing function that first invokes this function, and then invokes the `other` function (of a different response type) if this route had no result.
`static <T extends ServerResponse>
RouterFunction<T>`
RouterFunctions.`changeParser(RouterFunction<T> routerFunction, org.springframework.web.util.pattern.PathPatternParser parser)`
Changes the `PathPatternParser` on the given router function.
`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.
`void`
RouterFunctions.Visitor.`unknown(RouterFunction<?> routerFunction)`
Receive notification of an unknown router function.
Method parameters in org.springframework.web.servlet.function with type arguments of type RouterFunction
Modifier and Type
Method
Description
`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.`path(String pattern, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier)`
Route to the supplied router function if the given path prefix pattern applies.

## Uses of RouterFunction in org.springframework.web.servlet.function.support

Methods in org.springframework.web.servlet.function.support that return RouterFunction
Modifier and Type
Method
Description
`RouterFunction<?>`
RouterFunctionMapping.`getRouterFunction()`
Return the configured `RouterFunction`.
Methods in org.springframework.web.servlet.function.support with parameters of type RouterFunction
Modifier and Type
Method
Description
`void`
RouterFunctionMapping.`setRouterFunction(RouterFunction<?> routerFunction)`
Set the router function to map to.
Constructors in org.springframework.web.servlet.function.support with parameters of type RouterFunction
Modifier
Constructor
Description
``
`RouterFunctionMapping(RouterFunction<?> routerFunction)`
Create a `RouterFunctionMapping` with the given `RouterFunction`.