private static final class DefaultEntityResponseBuilder.DefaultEntityResponse<T> extends DefaultServerResponseBuilder.AbstractServerResponse implements EntityResponse<T>
EntityResponse.Builder<T>
ServerResponse.BodyBuilder, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>
Modifier and Type | Field and Description |
---|---|
private T |
entity |
private java.util.Map<java.lang.String,java.lang.Object> |
hints |
private BodyInserter<T,? super ServerHttpResponse> |
inserter |
Constructor and Description |
---|
DefaultEntityResponse(HttpStatus statusCode,
HttpHeaders headers,
T entity,
BodyInserter<T,? super ServerHttpResponse> inserter,
java.util.Map<java.lang.String,java.lang.Object> hints) |
Modifier and Type | Method and Description |
---|---|
T |
entity()
Return the entity that makes up this response.
|
BodyInserter<T,? super ServerHttpResponse> |
inserter()
Return the
BodyInserter that writes the entity to the output stream. |
<any> |
writeTo(ServerWebExchange exchange,
HandlerStrategies strategies)
Write this response to the given web exchange.
|
headers, statusCode, writeStatusAndHeaders
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromObject, fromPublisher, fromPublisher
accepted, badRequest, created, from, headers, noContent, notFound, ok, status, statusCode, unprocessableEntity
private final T entity
private final BodyInserter<T,? super ServerHttpResponse> inserter
private final java.util.Map<java.lang.String,java.lang.Object> hints
public DefaultEntityResponse(HttpStatus statusCode, HttpHeaders headers, T entity, BodyInserter<T,? super ServerHttpResponse> inserter, java.util.Map<java.lang.String,java.lang.Object> hints)
public T entity()
EntityResponse
entity
in interface EntityResponse<T>
public BodyInserter<T,? super ServerHttpResponse> inserter()
EntityResponse
BodyInserter
that writes the entity to the output stream.inserter
in interface EntityResponse<T>
public <any> writeTo(ServerWebExchange exchange, HandlerStrategies strategies)
ServerResponse
writeTo
in interface ServerResponse
exchange
- the web exchange to write tostrategies
- the strategies to use when writingMono<Void>
to indicate when writing is complete