接口 RouterFunction<T extends ServerResponse>

    • 方法详细资料

      • and

        default RouterFunction<Tand​(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.
        参数:
        other - the function of type T to apply when this function has no result
        返回:
        a composed function that first routes with this function and then the other function if this function has no result
        另请参阅:
        andOther(RouterFunction)
      • andOther

        default 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.
        参数:
        other - the function to apply when this function has no result
        返回:
        a composed function that first routes with this function and then the other function if this function has no result
        另请参阅:
        and(RouterFunction)
      • andRoute

        default RouterFunction<TandRoute​(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. This method is a convenient combination of and(RouterFunction) and RouterFunctions.route(RequestPredicate, HandlerFunction).
        参数:
        predicate - the predicate to test if this route does not match
        handlerFunction - the handler function to route to if this route does not match and the predicate applies
        返回:
        a composed function that route to handlerFunction if this route does not match and if predicate applies
      • andNest

        default RouterFunction<TandNest​(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. This method is a convenient combination of and(RouterFunction) and RouterFunctions.nest(RequestPredicate, RouterFunction).
        参数:
        predicate - the predicate to test if this route does not match
        routerFunction - the router function to route to if this route does not match and the predicate applies
        返回:
        a composed function that route to routerFunction if this route does not match and if predicate applies