T - the type of elements in the input streampublic interface HttpMessageEncoder<T> extends Encoder<T>
Encoder exposing extra methods relevant in the context
of HTTP request or response body encoding.| Modifier and Type | Method and Description |
|---|---|
default Map<String,Object> |
getEncodeHints(ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response)
Get decoding hints based on the server request or annotations on the
target controller method parameter.
|
List<MediaType> |
getStreamingMediaTypes()
Return "streaming" media types for which flushing should be performed
automatically vs at the end of the input stream.
|
canEncode, encode, encodeValue, getEncodableMimeTypes, getEncodableMimeTypesList<MediaType> getStreamingMediaTypes()
default Map<String,Object> getEncodeHints(ResolvableType actualType, ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response)
actualType - the actual source type to encode, possibly a reactive
wrapper and sourced from MethodParameter,
i.e. providing access to method annotations.elementType - the element type within Flux/Mono that we're
trying to encode.request - the current requestresponse - the current response