类 RouterFunctions.AttributesRouterFunction<T extends ServerResponse>

java.lang.Object
cn.taketoday.web.handler.function.RouterFunctions.AbstractRouterFunction<T>
cn.taketoday.web.handler.function.RouterFunctions.AttributesRouterFunction<T>
所有已实现的接口:
RouterFunction<T>
封闭类:
RouterFunctions

static final class RouterFunctions.AttributesRouterFunction<T extends ServerResponse> extends RouterFunctions.AbstractRouterFunction<T>
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • initAttributes

      private static Map<String,Object> initAttributes(Map<String,Object> attributes)
    • route

      public Optional<HandlerFunction<T>> route(ServerRequest request)
      从接口复制的说明: RouterFunction
      Return the handler function that matches the given request.
      参数:
      request - the request to route
      返回:
      an Optional describing the HandlerFunction that matches this request, or an empty Optional if there is no match
    • accept

      public void accept(RouterFunctions.Visitor visitor)
      从接口复制的说明: RouterFunction
      Accept the given visitor. Default implementation calls 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
    • withAttribute

      public RouterFunction<T> withAttribute(String name, Object value)
      从接口复制的说明: RouterFunction
      Return a new routing function with the given attribute.
      参数:
      name - the attribute name
      value - the attribute value
      返回:
      a function that has the specified attributes
    • withAttributes

      public RouterFunction<T> withAttributes(Consumer<Map<String,Object>> attributesConsumer)
      从接口复制的说明: RouterFunction
      Return a new routing function with attributes manipulated with the given consumer.

      The map provided to the consumer is "live", so that the consumer can be used to overwrite existing attributes, remove attributes, or use any of the other Map methods.

      参数:
      attributesConsumer - a function that consumes the attributes map
      返回:
      this builder