public static interface RenderingResponse.Builder
RenderingResponse
.Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<RenderingResponse> |
build()
Build the response.
|
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 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 statusreactor.core.publisher.Mono<RenderingResponse> build()