接口的使用
cn.taketoday.web.handler.function.RouterFunction
使用RouterFunction的程序包
程序包
说明
Provides the types that make up Infra functional web framework.
Classes supporting the
cn.taketoday.web.servlet.function package.-
cn.taketoday.web.handler.function中RouterFunction的使用
修饰符和类型类说明private static classRouter function returned byRouterFunctionBuilder.build()that simply iterates over the registered routes.(专用程序包) static class(专用程序包) static final classprivate static final classprivate static final class(专用程序包) static final classA composed routing function that first invokes one function, and then invokes another function (of a different response type) if this route had no result.(专用程序包) static final classRouterFunctions.FilteredRouterFunction<T extends ServerResponse,S extends ServerResponse> Filter the specified handler functions with the given filter function.private static class(专用程序包) static final classA composed routing function that first invokes one function, and then invokes the another function (of the same response typeT) if this route had no result.修饰符和类型字段说明private final RouterFunction<T>RouterFunctions.AttributesRouterFunction.delegateprivate final RouterFunction<?>RouterFunctions.DifferentComposedRouterFunction.firstprivate final RouterFunction<T>RouterFunctions.SameComposedRouterFunction.firstprivate final RouterFunction<T>RouterFunctions.DefaultNestedRouterFunction.routerFunctionprivate final RouterFunction<T>RouterFunctions.FilteredRouterFunction.routerFunctionprivate final RouterFunction<?>RouterFunctions.DifferentComposedRouterFunction.secondprivate final RouterFunction<T>RouterFunctions.SameComposedRouterFunction.second类型参数类型为RouterFunction的cn.taketoday.web.handler.function中的字段修饰符和类型字段说明private final List<RouterFunction<ServerResponse>>RouterFunctionBuilder.BuiltRouterFunction.routerFunctionsprivate final ArrayList<RouterFunction<ServerResponse>>RouterFunctionBuilder.routerFunctions修饰符和类型方法说明default RouterFunction<T>RouterFunction.and(RouterFunction<T> other) Return a composed routing function that first invokes this function, and then invokes theotherfunction (of the same response typeT) 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 theotherfunction (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.RouterFunctionBuilder.build()RouterFunctions.Builder.build()Builds theRouterFunction.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions.changeParser(RouterFunction<T> routerFunction, PathPatternParser parser) Changes thePathPatternParseron 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>Route requests that match the given pattern to resources relative to the given root location.static RouterFunction<ServerResponse>RouterFunctions.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) 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.RouterFunctions.AttributesRouterFunction.withAttribute(String name, Object value) default RouterFunction<T>RouterFunction.withAttributes(Consumer<Map<String, Object>> attributesConsumer) Return a new routing function with attributes manipulated with the given consumer.RouterFunctions.AttributesRouterFunction.withAttributes(Consumer<Map<String, Object>> attributesConsumer) 修饰符和类型方法说明RouterFunctionBuilder.add(RouterFunction<ServerResponse> routerFunction) 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 theotherfunction (of the same response typeT) 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 theotherfunction (of a different response type) if this route had no result.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions.changeParser(RouterFunction<T> routerFunction, PathPatternParser parser) Changes thePathPatternParseron 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.voidChangePathPatternParserVisitor.unknown(RouterFunction<?> routerFunction) voidRouterFunctions.Visitor.unknown(RouterFunction<?> routerFunction) Receive notification of an unknown router function.voidToStringVisitor.unknown(RouterFunction<?> routerFunction) 类型变量类型为RouterFunction的cn.taketoday.web.handler.function中的方法参数修饰符和类型方法说明RouterFunctionBuilder.nest(RequestPredicate predicate, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) RouterFunctions.Builder.nest(RequestPredicate predicate, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) Route to the supplied router function if the given request predicate applies.RouterFunctionBuilder.path(String pattern, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) RouterFunctions.Builder.path(String pattern, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) Route to the supplied router function if the given path prefix pattern applies.限定符构造器说明AttributesRouterFunction(RouterFunction<T> delegate, Map<String, Object> attributes) DefaultNestedRouterFunction(RequestPredicate predicate, RouterFunction<T> routerFunction) DifferentComposedRouterFunction(RouterFunction<?> first, RouterFunction<?> second) FilteredRouterFunction(RouterFunction<T> routerFunction, HandlerFilterFunction<T, S> filterFunction) SameComposedRouterFunction(RouterFunction<T> first, RouterFunction<T> second) 类型变量类型为RouterFunction的cn.taketoday.web.handler.function中的构造器参数 -
cn.taketoday.web.handler.function.support中RouterFunction的使用
修饰符和类型方法说明voidRouterFunctionMapping.setRouterFunction(RouterFunction<?> routerFunction) Set the router function to map to.类型变量类型为RouterFunction的cn.taketoday.web.handler.function.support中的方法参数修饰符和类型方法说明private voidRouterFunctionMapping.logRouterFunctions(List<RouterFunction> routerFunctions) 限定符构造器说明RouterFunctionMapping(RouterFunction<?> routerFunction) Create aRouterFunctionMappingwith the givenRouterFunction.