private static final class RouterFunctions.DefaultRouterFunction<T extends ServerResponse> extends RouterFunctions.AbstractRouterFunction<T>
Modifier and Type | Field and Description |
---|---|
private HandlerFunction<T> |
handlerFunction |
private RequestPredicate |
predicate |
Constructor and Description |
---|
DefaultRouterFunction(RequestPredicate predicate,
HandlerFunction<T> handlerFunction) |
Modifier and Type | Method and Description |
---|---|
void |
accept(RouterFunctions.Visitor visitor)
Accept the given visitor.
|
<any> |
route(ServerRequest request)
Return the handler function that matches the given request.
|
toString
private final RequestPredicate predicate
private final HandlerFunction<T extends ServerResponse> handlerFunction
public DefaultRouterFunction(RequestPredicate predicate, HandlerFunction<T> handlerFunction)
public <any> route(ServerRequest request)
RouterFunction
request
- the request to routeMono
describing the HandlerFunction
that matches this request,
or an empty Mono
if there is no matchpublic void accept(RouterFunctions.Visitor visitor)
RouterFunction
RouterFunctions.Visitor.unknown(RouterFunction)
; composed RouterFunction
implementations are expected to call accept
for all components that make up this
router functionvisitor
- the visitor to accept