public class ResponseEntityResultHandler extends AbstractMessageWriterResultHandler implements HandlerResultHandler
HttpEntity and ResponseEntity return values.
By default the order for this result handler is set to 0. It is generally safe to place it early in the order as it looks for a concrete return type.
loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
ResponseEntityResultHandler(List<HttpMessageWriter<?>> writers,
RequestedContentTypeResolver resolver)
Basic constructor with a default
ReactiveAdapterRegistry. |
ResponseEntityResultHandler(List<HttpMessageWriter<?>> writers,
RequestedContentTypeResolver resolver,
ReactiveAdapterRegistry registry)
Constructor with an
ReactiveAdapterRegistry instance. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
handleResult(ServerWebExchange exchange,
HandlerResult result)
Process the given result modifying response headers and/or writing data
to the response.
|
boolean |
supports(HandlerResult result)
Whether this handler supports the given
HandlerResult. |
getMessageWriters, writeBody, writeBodygetAdapter, getAdapterRegistry, getContentTypeResolver, getOrder, selectMediaType, setOrderpublic ResponseEntityResultHandler(List<HttpMessageWriter<?>> writers, RequestedContentTypeResolver resolver)
ReactiveAdapterRegistry.writers - the writers for serializing to the response bodyresolver - to determine the requested content typepublic ResponseEntityResultHandler(List<HttpMessageWriter<?>> writers, RequestedContentTypeResolver resolver, ReactiveAdapterRegistry registry)
ReactiveAdapterRegistry instance.writers - the writers for serializing to the response bodyresolver - to determine the requested content typeregistry - for adaptation to reactive typespublic boolean supports(HandlerResult result)
HandlerResultHandlerHandlerResult.supports in interface HandlerResultHandlerresult - the result object to checkpublic reactor.core.publisher.Mono<Void> handleResult(ServerWebExchange exchange, HandlerResult result)
HandlerResultHandlerhandleResult in interface HandlerResultHandlerexchange - current server exchangeresult - the result from the handlingMono<Void> to indicate when request handling is complete.