T - the type of the handler function to route to@FunctionalInterface public interface RouterFunction<T>
RouterFunctions| Modifier and Type | Method and Description |
|---|---|
default RouterFunction<?> |
and(RouterFunction<?> other)
Return a composed routing function that first invokes this function,
and then invokes the
other function (of a different type) if this route had
no result. |
default RouterFunction<T> |
andSame(RouterFunction<T> other)
Return a composed routing function that first invokes this function,
and then invokes the
other function (of the same type T) if this route had
no result. |
default <S> RouterFunction<S> |
filter(FilterFunction<T,S> filterFunction)
Filter all handler functions routed by this function with the given
filter function.
|
Optional<HandlerFunction<T>> |
route(Request request)
Return the handler function that matches the given request.
|
Optional<HandlerFunction<T>> route(Request request)
request - the request to route toOptional describing the HandlerFunction that matches this request,
or an empty Optional if there is no matchdefault RouterFunction<T> andSame(RouterFunction<T> other)
other function (of the same type T) if this route had
no result.other - the function of type T to apply when this function has no resultother function if this
function has no resultdefault RouterFunction<?> and(RouterFunction<?> other)
other function (of a different type) if this route had
no result.other - the function to apply when this function has no resultother function if this
function has no resultdefault <S> RouterFunction<S> filter(FilterFunction<T,S> filterFunction)
S - the filter return typefilterFunction - the filter to apply