public abstract class AbstractMessageWriterResultHandler extends HandlerResultHandlerSupport
HttpMessageWriter.logger| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMessageWriterResultHandler(List<org.springframework.http.codec.HttpMessageWriter<?>> messageWriters,
RequestedContentTypeResolver contentTypeResolver)
Constructor with
HttpMessageWriters and a
RequestedContentTypeResolver. |
protected |
AbstractMessageWriterResultHandler(List<org.springframework.http.codec.HttpMessageWriter<?>> messageWriters,
RequestedContentTypeResolver contentTypeResolver,
org.springframework.core.ReactiveAdapterRegistry adapterRegistry)
Constructor with an additional
ReactiveAdapterRegistry. |
| Modifier and Type | Method and Description |
|---|---|
List<org.springframework.http.codec.HttpMessageWriter<?>> |
getMessageWriters()
Return the configured message converters.
|
protected reactor.core.publisher.Mono<Void> |
writeBody(Object body,
org.springframework.core.MethodParameter bodyParameter,
org.springframework.core.MethodParameter actualParam,
org.springframework.web.server.ServerWebExchange exchange)
Write a given body to the response with
HttpMessageWriter. |
protected reactor.core.publisher.Mono<Void> |
writeBody(Object body,
org.springframework.core.MethodParameter bodyParameter,
org.springframework.web.server.ServerWebExchange exchange)
Write a given body to the response with
HttpMessageWriter. |
getAdapter, getAdapterRegistry, getContentTypeResolver, getOrder, selectMediaType, setOrderprotected AbstractMessageWriterResultHandler(List<org.springframework.http.codec.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<org.springframework.http.codec.HttpMessageWriter<?>> messageWriters, RequestedContentTypeResolver contentTypeResolver, org.springframework.core.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<org.springframework.http.codec.HttpMessageWriter<?>> getMessageWriters()
protected reactor.core.publisher.Mono<Void> writeBody(@Nullable Object body, org.springframework.core.MethodParameter bodyParameter, org.springframework.web.server.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, org.springframework.core.MethodParameter bodyParameter, @Nullable org.springframework.core.MethodParameter actualParam, org.springframework.web.server.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