public interface ServerHttpMessageWriter<T> extends HttpMessageWriter<T>
HttpMessageWriter that allows to resolve hints using annotations or
perform additional operation using ServerHttpRequest or ServerHttpResponse.| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
write(org.reactivestreams.Publisher<? extends T> inputStream,
org.springframework.core.ResolvableType streamType,
org.springframework.core.ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints)
Write a given object to the given output message with additional server related
parameters which could be used to create some hints or set the response status for example.
|
canWrite, getWritableMediaTypes, writereactor.core.publisher.Mono<Void> write(org.reactivestreams.Publisher<? extends T> inputStream, org.springframework.core.ResolvableType streamType, org.springframework.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String,Object> hints)
streamType - the original type used for the method return value. For annotation
based controllers, the MethodParameter is available via ResolvableType.getSource().
Can be null.elementType - the stream element type to processmediaType - the content type to use when writing. May be null to
indicate that the default content type of the converter must be used.request - the current HTTP requestresponse - the current HTTP responseMono that indicates completion or error