public static interface RenderingResponse.Builder
RenderingResponse
.Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<RenderingResponse> |
build()
Build the response.
|
RenderingResponse.Builder |
cookie(ResponseCookie cookie)
Add the given cookie to the response.
|
RenderingResponse.Builder |
cookies(java.util.function.Consumer<MultiValueMap<java.lang.String,ResponseCookie>> cookiesConsumer)
Manipulate this response's cookies with the given consumer.
|
RenderingResponse.Builder |
header(java.lang.String headerName,
java.lang.String... headerValues)
Add the given header value(s) under the given name.
|
RenderingResponse.Builder |
headers(HttpHeaders headers)
Copy the given headers into the entity's headers map.
|
RenderingResponse.Builder |
modelAttribute(java.lang.Object attribute)
Add the supplied attribute to the model using a
generated name.
|
RenderingResponse.Builder |
modelAttribute(java.lang.String name,
java.lang.Object value)
Add the supplied attribute value under the supplied name.
|
RenderingResponse.Builder |
modelAttributes(java.util.Collection<?> attributes)
Copy all attributes in the supplied
Collection into the model,
using attribute name generation for each element. |
RenderingResponse.Builder |
modelAttributes(java.util.Map<java.lang.String,?> attributes)
Copy all attributes in the supplied
Map into the model. |
RenderingResponse.Builder |
modelAttributes(java.lang.Object... attributes)
Copy all attributes in the supplied array into the model,
using attribute name generation for each element.
|
RenderingResponse.Builder |
status(HttpStatus status)
Set the HTTP status.
|
RenderingResponse.Builder |
status(int status)
Set the HTTP status.
|
RenderingResponse.Builder modelAttribute(java.lang.Object attribute)
Collections
are not added to
the model when using this method because we cannot correctly determine
the true convention name. View code should check for null
rather
than for empty collections.
attribute
- the model attribute value (never null
)RenderingResponse.Builder modelAttribute(java.lang.String name, @Nullable java.lang.Object value)
name
- the name of the model attribute (never null
)value
- the model attribute value (can be null
)RenderingResponse.Builder modelAttributes(java.lang.Object... attributes)
modelAttribute(Object)
RenderingResponse.Builder modelAttributes(java.util.Collection<?> attributes)
Collection
into the model,
using attribute name generation for each element.modelAttribute(Object)
RenderingResponse.Builder modelAttributes(java.util.Map<java.lang.String,?> attributes)
Map
into the model.modelAttribute(String, Object)
RenderingResponse.Builder header(java.lang.String headerName, java.lang.String... headerValues)
headerName
- the header nameheaderValues
- the header value(s)HttpHeaders.add(String, String)
RenderingResponse.Builder headers(HttpHeaders headers)
headers
- the existing HttpHeaders to copy fromHttpHeaders.add(String, String)
RenderingResponse.Builder status(HttpStatus status)
status
- the response statusRenderingResponse.Builder status(int status)
status
- the response statusRenderingResponse.Builder cookie(ResponseCookie cookie)
cookie
- the cookie to addRenderingResponse.Builder cookies(java.util.function.Consumer<MultiValueMap<java.lang.String,ResponseCookie>> cookiesConsumer)
MultiValueMap
methods.cookiesConsumer
- a function that consumes the cookiesreactor.core.publisher.Mono<RenderingResponse> build()