private static final class DefaultEntityResponseBuilder.DefaultEntityResponse<T> extends DefaultServerResponseBuilder.AbstractServerResponse implements EntityResponse<T>
EntityResponse.Builder<T>
ServerResponse.BodyBuilder, ServerResponse.Context, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>
Modifier and Type | Field and Description |
---|---|
private T |
entity |
private BodyInserter<T,? super ServerHttpResponse> |
inserter |
hints, statusCode
Constructor and Description |
---|
DefaultEntityResponse(int statusCode,
HttpHeaders headers,
MultiValueMap<java.lang.String,ResponseCookie> cookies,
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. |
protected <any> |
writeToInternal(ServerWebExchange exchange,
ServerResponse.Context context) |
cookies, headers, statusCode, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromObject, fromPublisher, fromPublisher
accepted, badRequest, cookies, created, from, headers, noContent, notFound, ok, permanentRedirect, seeOther, status, status, statusCode, temporaryRedirect, unprocessableEntity, writeTo
private final T entity
private final BodyInserter<T,? super ServerHttpResponse> inserter
public DefaultEntityResponse(int statusCode, HttpHeaders headers, MultiValueMap<java.lang.String,ResponseCookie> cookies, 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>
protected <any> writeToInternal(ServerWebExchange exchange, ServerResponse.Context context)
writeToInternal
in class DefaultServerResponseBuilder.AbstractServerResponse