static final class RouterFunctions.DifferentComposedRouterFunction extends RouterFunctions.AbstractRouterFunction<ServerResponse>
Modifier and Type | Field and Description |
---|---|
private RouterFunction<?> |
first |
private RouterFunction<?> |
second |
Constructor and Description |
---|
DifferentComposedRouterFunction(RouterFunction<?> first,
RouterFunction<?> second) |
Modifier and Type | Method and Description |
---|---|
void |
accept(RouterFunctions.Visitor visitor)
Accept the given visitor.
|
java.util.Optional<HandlerFunction<ServerResponse>> |
route(ServerRequest request)
Return the handler function that matches the given request.
|
toString
private final RouterFunction<?> first
private final RouterFunction<?> second
public DifferentComposedRouterFunction(RouterFunction<?> first, RouterFunction<?> second)
public java.util.Optional<HandlerFunction<ServerResponse>> route(ServerRequest request)
RouterFunction
request
- the request to routeOptional
describing the HandlerFunction
that matches this request,
or an empty Optional
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 function.visitor
- the visitor to accept