接口的使用
cn.taketoday.web.handler.function.ServerRequest
使用ServerRequest的程序包
程序包
说明
Provides the types that make up Infra functional web framework.
-
cn.taketoday.web.handler.function中ServerRequest的使用
修饰符和类型类说明(专用程序包) classServerRequestimplementation based on aRequestContext.private static classprivate static class类型参数类型为ServerRequest的cn.taketoday.web.handler.function中的字段修饰符和类型字段说明private final Function<ServerRequest,Optional<cn.taketoday.core.io.Resource>> RouterFunctions.ResourcesRouterFunction.lookupFunctionprivate final Consumer<ServerRequest>RequestPredicates.RequestModifyingPredicate.Result.modifyprivate final BiFunction<Throwable,ServerRequest, T> ErrorHandlingServerResponse.ErrorHandler.responseProvider修饰符和类型方法说明DefaultServerRequestBuilder.build()ServerRequest.Builder.build()Build the request.static ServerRequestServerRequest.create(RequestContext context, List<HttpMessageConverter<?>> messageReaders) Create a newServerRequestbased on the givenRequestContextand message converters.static ServerRequestServerRequest.find(RequestContext context) static ServerRequestServerRequest.findRequired(RequestContext context) 返回变量类型为ServerRequest的类型的cn.taketoday.web.handler.function中的方法修饰符和类型方法说明default Optional<ServerRequest>RequestPredicate.nest(ServerRequest request) Transform the given request into a request used for a nested route.RequestPredicates.AndRequestPredicate.nest(ServerRequest request) RequestPredicates.OrRequestPredicate.nest(ServerRequest request) RequestPredicates.PathPatternPredicate.nest(ServerRequest request) static Function<ServerRequest,Optional<cn.taketoday.core.io.Resource>> RouterFunctions.resourceLookupFunction(String pattern, cn.taketoday.core.io.Resource location) Returns the resource lookup function used byRouterFunctions.resources(String, Resource).修饰符和类型方法说明Optional<cn.taketoday.core.io.Resource>PathResourceLookupFunction.apply(ServerRequest request) HandlerFilterFunction.filter(ServerRequest request, HandlerFunction<T> next) Apply this filter to the given handler function.static ServerRequest.BuilderServerRequest.from(ServerRequest other) Create a builder with the status, headers, and cookies of the given request.ErrorHandlingServerResponse.ErrorHandler.handle(Throwable t, ServerRequest serverRequest) HandlerFunction.handle(ServerRequest request) Handle the given request.ResourceHandlerFunction.handle(ServerRequest request) private voidRequestPredicates.PathPatternPredicate.mergeAttributes(ServerRequest request, Map<String, String> variables) RequestPredicates.SubPathServerRequestWrapper.mergeAttributes(ServerRequest request, Map<String, String> pathVariables, PathPattern pattern) private static HttpMethodRequestPredicates.HttpMethodPredicate.method(ServerRequest request) voidRequestPredicates.RequestModifyingPredicate.Result.modify(ServerRequest request) default Optional<ServerRequest>RequestPredicate.nest(ServerRequest request) Transform the given request into a request used for a nested route.RequestPredicates.AndRequestPredicate.nest(ServerRequest request) RequestPredicates.OrRequestPredicate.nest(ServerRequest request) RequestPredicates.PathPatternPredicate.nest(ServerRequest request) RouterFunction.route(ServerRequest request) Return the handler function that matches the given request.RouterFunctionBuilder.BuiltRouterFunction.route(ServerRequest request) RouterFunctions.AttributesRouterFunction.route(ServerRequest request) RouterFunctions.DefaultNestedRouterFunction.route(ServerRequest serverRequest) RouterFunctions.DefaultRouterFunction.route(ServerRequest request) RouterFunctions.DifferentComposedRouterFunction.route(ServerRequest request) RouterFunctions.FilteredRouterFunction.route(ServerRequest request) RouterFunctions.ResourcesRouterFunction.route(ServerRequest request) RouterFunctions.SameComposedRouterFunction.route(ServerRequest request) booleanRequestPredicate.test(ServerRequest request) Evaluate this predicate on the given request.booleanRequestPredicates.HeadersPredicate.test(ServerRequest request) booleanRequestPredicates.HttpMethodPredicate.test(ServerRequest request) booleanRequestPredicates.ParamPredicate.test(ServerRequest request) booleanRequestPredicates.PathExtensionPredicate.test(ServerRequest request) final booleanRequestPredicates.RequestModifyingPredicate.test(ServerRequest request) RequestPredicates.AndRequestPredicate.testInternal(ServerRequest request) RequestPredicates.NegateRequestPredicate.testInternal(ServerRequest request) RequestPredicates.OrRequestPredicate.testInternal(ServerRequest request) RequestPredicates.PathPatternPredicate.testInternal(ServerRequest request) protected abstract RequestPredicates.RequestModifyingPredicate.ResultRequestPredicates.RequestModifyingPredicate.testInternal(ServerRequest request) 类型变量类型为ServerRequest的cn.taketoday.web.handler.function中的方法参数修饰符和类型方法说明protected final <T extends ServerResponse>
voidErrorHandlingServerResponse.addErrorHandler(Predicate<Throwable> predicate, BiFunction<Throwable, ServerRequest, T> errorHandler) 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) 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.RouterFunctions.Builder.before(Function<ServerRequest, ServerRequest> requestProcessor) Filter the request object for all routes created by this builder with the given request processing function.RequestPredicates.RequestModifyingPredicate.Result.of(boolean value, Consumer<ServerRequest> commit) static <T extends ServerResponse>
HandlerFilterFunction<T,T> HandlerFilterFunction.ofErrorHandler(Predicate<Throwable> predicate, BiFunction<Throwable, ServerRequest, T> errorHandler) Adapt the given predicate and response provider function to a filter function that returns aServerResponseon a given exception.static <T extends ServerResponse>
HandlerFilterFunction<T,T> HandlerFilterFunction.ofRequestProcessor(Function<ServerRequest, ServerRequest> requestProcessor) Adapt the given request processor function to a filter function that only operates on theServerRequest.static <T extends ServerResponse>
HandlerFilterFunction<T,T> HandlerFilterFunction.ofRequestProcessor(Function<ServerRequest, ServerRequest> requestProcessor) Adapt the given request processor function to a filter function that only operates on theServerRequest.static <T extends ServerResponse,R extends ServerResponse>
HandlerFilterFunction<T,R> HandlerFilterFunction.ofResponseProcessor(BiFunction<ServerRequest, T, R> responseProcessor) Adapt the given response processor function to a filter function that only operates on theServerResponse.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.voidChangePathPatternParserVisitor.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) RouterFunctionBuilder.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) RouterFunctions.Builder.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) Route to resources using the provided lookup function.static RouterFunction<ServerResponse>RouterFunctions.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) Route to resources using the provided lookup function.voidRouterFunctions.Visitor.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) Receive notification of a resource router function.voidToStringVisitor.resources(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) 限定符构造器说明SubPathServerRequestWrapper(ServerRequest request, PathPattern.PathRemainingMatchInfo info, PathPattern pattern) 类型变量类型为ServerRequest的cn.taketoday.web.handler.function中的构造器参数限定符构造器说明ErrorHandler(Predicate<Throwable> predicate, BiFunction<Throwable, ServerRequest, T> responseProvider) ResourcesRouterFunction(Function<ServerRequest, Optional<cn.taketoday.core.io.Resource>> lookupFunction) privateResult(boolean value, Consumer<ServerRequest> modify)