类 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>
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaccept(RouterFunctions.Visitor visitor) Accept the given visitor.initAttributes(Map<String, Object> attributes) route(ServerRequest request) Return the handler function that matches the given request.withAttribute(String name, Object value) Return a new routing function with the given attribute.withAttributes(Consumer<Map<String, Object>> attributesConsumer) Return a new routing function with attributes manipulated with the given consumer.从类继承的方法 cn.taketoday.web.handler.function.RouterFunctions.AbstractRouterFunction
toString
-
字段详细资料
-
delegate
-
attributes
-
-
构造器详细资料
-
AttributesRouterFunction
-
-
方法详细资料
-
initAttributes
-
route
从接口复制的说明:RouterFunctionReturn the handler function that matches the given request.- 参数:
request- the request to route- 返回:
- an
Optionaldescribing theHandlerFunctionthat matches this request, or an emptyOptionalif there is no match
-
accept
从接口复制的说明:RouterFunctionAccept the given visitor. Default implementation callsRouterFunctions.Visitor.unknown(RouterFunction); composedRouterFunctionimplementations are expected to callacceptfor all components that make up this router function.- 参数:
visitor- the visitor to accept
-
withAttribute
从接口复制的说明:RouterFunctionReturn a new routing function with the given attribute.- 参数:
name- the attribute namevalue- the attribute value- 返回:
- a function that has the specified attributes
-
withAttributes
从接口复制的说明:RouterFunctionReturn 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
Mapmethods.- 参数:
attributesConsumer- a function that consumes the attributes map- 返回:
- this builder
-