类 DefaultRenderingResponseBuilder
java.lang.Object
cn.taketoday.web.handler.function.DefaultRenderingResponseBuilder
- 所有已实现的接口:
RenderingResponse.Builder
Default
RenderingResponse.Builder implementation.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Harry Yang
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final cn.taketoday.util.LinkedMultiValueMap<String,HttpCookie> private final HttpHeadersprivate final LinkedHashMap<String,Object> private final Stringprivate HttpStatusCode -
构造器概要
构造器构造器说明 -
方法概要
修饰符和类型方法说明build()Build the response.cookie(HttpCookie cookie) Add the given cookie to the response.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) Manipulate this response's cookies with the given consumer.Add the given header value(s) under the given name.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.modelAttribute(Object attribute) Add the supplied attribute to the model using a generated name.modelAttribute(String name, Object value) Add the supplied attribute value under the supplied name.modelAttributes(Object... attributes) Copy all attributes in the supplied array into the model, using attribute name generation for each element.modelAttributes(Collection<?> attributes) Copy all attributes in the suppliedCollectioninto the model, using attribute name generation for each element.modelAttributes(Map<String, ?> attributes) Copy all attributes in the suppliedMapinto the model.status(int status) Set the HTTP status.status(HttpStatusCode status) Set the HTTP status.
-
字段详细资料
-
name
-
status
-
headers
-
model
-
cookies
-
-
构造器详细资料
-
DefaultRenderingResponseBuilder
-
DefaultRenderingResponseBuilder
-
-
方法详细资料
-
status
从接口复制的说明:RenderingResponse.BuilderSet the HTTP status.- 指定者:
status在接口中RenderingResponse.Builder- 参数:
status- the response status- 返回:
- this builder
-
status
从接口复制的说明:RenderingResponse.BuilderSet the HTTP status.- 指定者:
status在接口中RenderingResponse.Builder- 参数:
status- the response status- 返回:
- this builder
-
cookie
从接口复制的说明:RenderingResponse.BuilderAdd the given cookie to the response.- 指定者:
cookie在接口中RenderingResponse.Builder- 参数:
cookie- the cookie to add- 返回:
- this builder
-
cookies
public RenderingResponse.Builder cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) 从接口复制的说明:RenderingResponse.BuilderManipulate this response's cookies with the given consumer. The cookies provided to the consumer are "live", so that the consumer can be used to overwrite existing cookies, remove cookies, or use any of the otherMultiValueMapmethods.- 指定者:
cookies在接口中RenderingResponse.Builder- 参数:
cookiesConsumer- a function that consumes the cookies- 返回:
- this builder
-
modelAttribute
从接口复制的说明:RenderingResponse.BuilderAdd the supplied attribute to the model using a generated name.Note: Empty
Collectionsare not added to the model when using this method because we cannot correctly determine the true convention name. View code should check fornullrather than for empty collections.- 指定者:
modelAttribute在接口中RenderingResponse.Builder- 参数:
attribute- the model attribute value (nevernull)
-
modelAttribute
从接口复制的说明:RenderingResponse.BuilderAdd the supplied attribute value under the supplied name.- 指定者:
modelAttribute在接口中RenderingResponse.Builder- 参数:
name- the name of the model attribute (nevernull)value- the model attribute value (can benull)
-
modelAttributes
从接口复制的说明:RenderingResponse.BuilderCopy all attributes in the supplied array into the model, using attribute name generation for each element. -
modelAttributes
从接口复制的说明:RenderingResponse.BuilderCopy all attributes in the suppliedCollectioninto the model, using attribute name generation for each element. -
modelAttributes
从接口复制的说明:RenderingResponse.BuilderCopy all attributes in the suppliedMapinto the model. -
header
从接口复制的说明:RenderingResponse.BuilderAdd the given header value(s) under the given name.- 指定者:
header在接口中RenderingResponse.Builder- 参数:
headerName- the header nameheaderValues- the header value(s)- 返回:
- this builder
- 另请参阅:
-
headers
从接口复制的说明:RenderingResponse.BuilderManipulate this response's headers with the given consumer. The headers provided to the consumer are "live", so that the consumer can be used to overwrite existing header values, remove values, or use any of the otherHttpHeadersmethods.- 指定者:
headers在接口中RenderingResponse.Builder- 参数:
headersConsumer- a function that consumes theHttpHeaders- 返回:
- this builder
-
build
从接口复制的说明:RenderingResponse.BuilderBuild the response.- 指定者:
build在接口中RenderingResponse.Builder- 返回:
- the built response
-