接口的使用
cn.taketoday.web.handler.function.RouterFunctions.Builder
使用RouterFunctions.Builder的程序包
程序包
说明
Provides the types that make up Infra functional web framework.
-
cn.taketoday.web.handler.function中RouterFunctions.Builder的使用
修饰符和类型方法说明private RouterFunctions.BuilderRouterFunctionBuilder.add(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.add(RouterFunction<ServerResponse> routerFunction) RouterFunctions.Builder.add(RouterFunction<ServerResponse> routerFunction) Adds the given route to this builder.RouterFunctionBuilder.after(BiFunction<ServerRequest, ServerResponse, ServerResponse> responseProcessor) RouterFunctions.Builder.after(BiFunction<ServerRequest, ServerResponse, ServerResponse> responseProcessor) Filter the response object for all routes created by this builder with the given response processing function.RouterFunctionBuilder.before(Function<ServerRequest, ServerRequest> requestProcessor) RouterFunctions.Builder.before(Function<ServerRequest, ServerRequest> requestProcessor) Filter the request object for all routes created by this builder with the given request processing function.RouterFunctionBuilder.DELETE(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.DELETE(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.DELETE(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.DELETE(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.DELETE(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPDELETErequests.RouterFunctions.Builder.DELETE(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPDELETErequests that match the given predicate.RouterFunctions.Builder.DELETE(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPDELETErequests that match the given pattern.RouterFunctions.Builder.DELETE(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPDELETErequests that match the given pattern and predicate.RouterFunctionBuilder.filter(HandlerFilterFunction<ServerResponse, ServerResponse> filterFunction) RouterFunctions.Builder.filter(HandlerFilterFunction<ServerResponse, ServerResponse> filterFunction) Filters all routes created by this builder with the given filter function.RouterFunctionBuilder.GET(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.GET(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.GET(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.GET(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.GET(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPGETrequests.RouterFunctions.Builder.GET(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPGETrequests that match the given predicate.RouterFunctions.Builder.GET(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPGETrequests that match the given pattern.RouterFunctions.Builder.GET(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPGETrequests that match the given pattern and predicate.RouterFunctionBuilder.HEAD(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.HEAD(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.HEAD(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.HEAD(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.HEAD(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPHEADrequests.RouterFunctions.Builder.HEAD(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPHEADrequests that match the given predicate.RouterFunctions.Builder.HEAD(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPHEADrequests that match the given pattern.RouterFunctions.Builder.HEAD(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPHEADrequests that match the given pattern and predicate.RouterFunctionBuilder.nest(RequestPredicate predicate, Consumer<RouterFunctions.Builder> builderConsumer) RouterFunctionBuilder.nest(RequestPredicate predicate, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) RouterFunctions.Builder.nest(RequestPredicate predicate, Consumer<RouterFunctions.Builder> builderConsumer) Route to a built router function if the given request predicate applies.RouterFunctions.Builder.nest(RequestPredicate predicate, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) Route to the supplied router function if the given request predicate applies.RouterFunctionBuilder.onError(Class<? extends Throwable> exceptionType, BiFunction<Throwable, ServerRequest, ServerResponse> responseProvider) RouterFunctionBuilder.onError(Predicate<Throwable> predicate, BiFunction<Throwable, ServerRequest, ServerResponse> responseProvider) RouterFunctions.Builder.onError(Class<? extends Throwable> exceptionType, BiFunction<Throwable, ServerRequest, ServerResponse> responseProvider) Filters all exceptions of the given type by applying the given response provider function.RouterFunctions.Builder.onError(Predicate<Throwable> predicate, BiFunction<Throwable, ServerRequest, ServerResponse> responseProvider) Filters all exceptions that match the predicate by applying the given response provider function.RouterFunctionBuilder.OPTIONS(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.OPTIONS(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.OPTIONS(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.OPTIONS(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.OPTIONS(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPOPTIONSrequests.RouterFunctions.Builder.OPTIONS(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPOPTIONSrequests that match the given predicate.RouterFunctions.Builder.OPTIONS(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPOPTIONSrequests that match the given pattern.RouterFunctions.Builder.OPTIONS(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPOPTIONSrequests that match the given pattern and predicate.RouterFunctionBuilder.PATCH(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.PATCH(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.PATCH(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.PATCH(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.PATCH(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPPATCHrequests.RouterFunctions.Builder.PATCH(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPATCHrequests that match the given predicate.RouterFunctions.Builder.PATCH(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPATCHrequests that match the given pattern.RouterFunctions.Builder.PATCH(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPATCHrequests that match the given pattern and predicate.RouterFunctionBuilder.path(String pattern, Consumer<RouterFunctions.Builder> builderConsumer) RouterFunctionBuilder.path(String pattern, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) RouterFunctions.Builder.path(String pattern, Consumer<RouterFunctions.Builder> builderConsumer) Route to a built router function if the given path prefix pattern applies.RouterFunctions.Builder.path(String pattern, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) Route to the supplied router function if the given path prefix pattern applies.RouterFunctionBuilder.POST(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.POST(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.POST(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.POST(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.POST(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPPOSTrequests.RouterFunctions.Builder.POST(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPOSTrequests that match the given predicate.RouterFunctions.Builder.POST(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPOSTrequests that match the given pattern.RouterFunctions.Builder.POST(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPOSTrequests that match the given pattern and predicate.RouterFunctionBuilder.PUT(HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.PUT(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.PUT(String pattern, HandlerFunction<ServerResponse> handlerFunction) RouterFunctionBuilder.PUT(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.PUT(HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles HTTPPUTrequests.RouterFunctions.Builder.PUT(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPUTrequests that match the given predicate.RouterFunctions.Builder.PUT(String pattern, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPUTrequests that match the given pattern.RouterFunctions.Builder.PUT(String pattern, RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all HTTPPUTrequests that match the given pattern and predicate.RouterFunctionBuilder.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) Route requests that match the given pattern to resources relative to the given root location.RouterFunctions.Builder.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) Route to resources using the provided lookup function.RouterFunctionBuilder.route(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) RouterFunctions.Builder.route(RequestPredicate predicate, HandlerFunction<ServerResponse> handlerFunction) Adds a route to the given handler function that handles all requests that match the given predicate.static RouterFunctions.BuilderRouterFunctions.route()Offers a discoverable way to create router functions through a builder-style interface.RouterFunctionBuilder.withAttribute(String name, Object value) RouterFunctions.Builder.withAttribute(String name, Object value) Add an attribute with the given name and value to the last route built with this builder.RouterFunctionBuilder.withAttributes(Consumer<Map<String, Object>> attributesConsumer) RouterFunctions.Builder.withAttributes(Consumer<Map<String, Object>> attributesConsumer) Manipulate the attributes of the last route built with the given consumer.类型变量类型为RouterFunctions.Builder的cn.taketoday.web.handler.function中的方法参数修饰符和类型方法说明RouterFunctionBuilder.nest(RequestPredicate predicate, Consumer<RouterFunctions.Builder> builderConsumer) RouterFunctions.Builder.nest(RequestPredicate predicate, Consumer<RouterFunctions.Builder> builderConsumer) Route to a built router function if the given request predicate applies.RouterFunctionBuilder.path(String pattern, Consumer<RouterFunctions.Builder> builderConsumer) RouterFunctions.Builder.path(String pattern, Consumer<RouterFunctions.Builder> builderConsumer) Route to a built router function if the given path prefix pattern applies.