public abstract class AbstractMessageWriterResultHandler extends HandlerResultHandlerSupport
HttpMessageWriter
.Modifier and Type | Field and Description |
---|---|
protected static String |
COROUTINES_FLOW_CLASS_NAME |
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier | Constructor and Description |
---|---|
protected |
AbstractMessageWriterResultHandler(List<HttpMessageWriter<?>> messageWriters,
RequestedContentTypeResolver contentTypeResolver)
Constructor with
HttpMessageWriters and a
RequestedContentTypeResolver . |
protected |
AbstractMessageWriterResultHandler(List<HttpMessageWriter<?>> messageWriters,
RequestedContentTypeResolver contentTypeResolver,
ReactiveAdapterRegistry adapterRegistry)
Constructor with an additional
ReactiveAdapterRegistry . |
Modifier and Type | Method and Description |
---|---|
List<HttpMessageWriter<?>> |
getMessageWriters()
Return the configured message converters.
|
protected reactor.core.publisher.Mono<Void> |
writeBody(Object body,
MethodParameter bodyParameter,
MethodParameter actualParam,
ServerWebExchange exchange)
Write a given body to the response with
HttpMessageWriter . |
protected reactor.core.publisher.Mono<Void> |
writeBody(Object body,
MethodParameter bodyParameter,
ServerWebExchange exchange)
Write a given body to the response with
HttpMessageWriter . |
getAdapter, getAdapterRegistry, getContentTypeResolver, getOrder, selectMediaType, setOrder
protected static final String COROUTINES_FLOW_CLASS_NAME
protected AbstractMessageWriterResultHandler(List<HttpMessageWriter<?>> messageWriters, RequestedContentTypeResolver contentTypeResolver)
HttpMessageWriters
and a
RequestedContentTypeResolver
.messageWriters
- for serializing Objects to the response body streamcontentTypeResolver
- for resolving the requested content typeprotected AbstractMessageWriterResultHandler(List<HttpMessageWriter<?>> messageWriters, RequestedContentTypeResolver contentTypeResolver, ReactiveAdapterRegistry adapterRegistry)
ReactiveAdapterRegistry
.messageWriters
- for serializing Objects to the response body streamcontentTypeResolver
- for resolving the requested content typeadapterRegistry
- for adapting other reactive types (e.g. rx.Observable,
rx.Single, etc.) to Flux or Monopublic List<HttpMessageWriter<?>> getMessageWriters()
protected reactor.core.publisher.Mono<Void> writeBody(@Nullable Object body, MethodParameter bodyParameter, ServerWebExchange exchange)
HttpMessageWriter
.body
- the object to writebodyParameter
- the MethodParameter
of the body to writeexchange
- the current exchangewriteBody(Object, MethodParameter, MethodParameter, ServerWebExchange)
protected reactor.core.publisher.Mono<Void> writeBody(@Nullable Object body, MethodParameter bodyParameter, @Nullable MethodParameter actualParam, ServerWebExchange exchange)
HttpMessageWriter
.body
- the object to writebodyParameter
- the MethodParameter
of the body to writeactualParam
- the actual return type of the method that returned the value;
could be different from bodyParameter
when processing HttpEntity
for exampleexchange
- the current exchange