T - the entity typepublic interface EntityResponse<T> extends ServerResponse
ServerResponse that exposes entity data.| Modifier and Type | Interface and Description | 
|---|---|
static interface  | 
EntityResponse.Builder<T>
Defines a builder for  
EntityResponse. | 
ServerResponse.BodyBuilder, ServerResponse.Context, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>| Modifier and Type | Method and Description | 
|---|---|
T | 
entity()
Return the entity that makes up this response. 
 | 
static <T> EntityResponse.Builder<T> | 
fromObject(T t)
Create a builder with the given object. 
 | 
static <T,P extends org.reactivestreams.Publisher<T>> | 
fromPublisher(P publisher,
             Class<T> elementClass)
Create a builder with the given publisher. 
 | 
static <T,P extends org.reactivestreams.Publisher<T>> | 
fromPublisher(P publisher,
             ParameterizedTypeReference<T> typeReference)
Create a builder with the given publisher. 
 | 
BodyInserter<T,? super ServerHttpResponse> | 
inserter()
Return the  
BodyInserter that writes the entity to the output stream. | 
accepted, badRequest, cookies, created, from, headers, noContent, notFound, ok, permanentRedirect, seeOther, status, status, statusCode, temporaryRedirect, unprocessableEntity, writeToT entity()
BodyInserter<T,? super ServerHttpResponse> inserter()
BodyInserter that writes the entity to the output stream.static <T> EntityResponse.Builder<T> fromObject(T t)
T - the type of the elements contained in the publishert - the object that represents the body of the responsestatic <T,P extends org.reactivestreams.Publisher<T>> EntityResponse.Builder<P> fromPublisher(P publisher, Class<T> elementClass)
T - the type of the elements contained in the publisherP - the type of the Publisherpublisher - the publisher that represents the body of the responseelementClass - the class of elements contained in the publisherstatic <T,P extends org.reactivestreams.Publisher<T>> EntityResponse.Builder<P> fromPublisher(P publisher, ParameterizedTypeReference<T> typeReference)
T - the type of the elements contained in the publisherP - the type of the Publisherpublisher - the publisher that represents the body of the responsetypeReference - the type of elements contained in the publisher