spring-framework / org.springframework.http.codec / DecoderHttpMessageReader

DecoderHttpMessageReader

open class DecoderHttpMessageReader<T : Any> : HttpMessageReader<T>

HttpMessageReader that wraps and delegates to a Decoder.

Also a HttpMessageReader that pre-resolves decoding hints from the extra information available on the server side such as the request or controller method parameter annotations.

Author
Arjen Poutsma

Author
Sebastien Deleuze

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

DecoderHttpMessageReader(decoder: Decoder<T>)

Create an instance wrapping the given Decoder.

Functions

canRead

open fun canRead(elementType: ResolvableType, mediaType: MediaType): Boolean

getDecoder

open fun getDecoder(): Decoder<T>

Return the Decoder of this reader.

getReadableMediaTypes

open fun getReadableMediaTypes(): MutableList<MediaType>

read

open fun read(elementType: ResolvableType, message: ReactiveHttpInputMessage, hints: MutableMap<String, Any>): Flux<T>
open fun read(actualType: ResolvableType, elementType: ResolvableType, request: ServerHttpRequest, response: ServerHttpResponse, hints: MutableMap<String, Any>): Flux<T>

readMono

open fun readMono(elementType: ResolvableType, message: ReactiveHttpInputMessage, hints: MutableMap<String, Any>): Mono<T>
open fun readMono(actualType: ResolvableType, elementType: ResolvableType, request: ServerHttpRequest, response: ServerHttpResponse, hints: MutableMap<String, Any>): Mono<T>