public class DecoderHttpMessageReader<T> extends Object implements HttpMessageReader<T>
HttpMessageReader interface that delegates
to a Decoder.| Constructor and Description |
|---|
DecoderHttpMessageReader(Decoder<T> decoder)
Create a
CodecHttpMessageConverter with the given Decoder. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(ResolvableType type,
MediaType mediaType)
Indicates whether the given class can be read by this converter.
|
List<MediaType> |
getReadableMediaTypes()
Return the list of
MediaType objects that can be read by this converter. |
reactor.core.publisher.Flux<T> |
read(ResolvableType type,
ReactiveHttpInputMessage inputMessage)
Read a
Flux of the given type form the given input message, and returns it. |
reactor.core.publisher.Mono<T> |
readMono(ResolvableType type,
ReactiveHttpInputMessage inputMessage)
Read a
Mono of the given type form the given input message, and returns it. |
public boolean canRead(ResolvableType type, MediaType mediaType)
HttpMessageReadercanRead in interface HttpMessageReader<T>type - the type to test for readabilitymediaType - the media type to read, can be null if not specified.
Typically the value of a Content-Type header.true if readable; false otherwisepublic List<MediaType> getReadableMediaTypes()
HttpMessageReaderMediaType objects that can be read by this converter.getReadableMediaTypes in interface HttpMessageReader<T>public reactor.core.publisher.Flux<T> read(ResolvableType type, ReactiveHttpInputMessage inputMessage)
HttpMessageReaderFlux of the given type form the given input message, and returns it.read in interface HttpMessageReader<T>type - the type of object to return. This type must have previously been
passed to the canRead method of this interface, which must have
returned true.inputMessage - the HTTP input message to read fromFlux of elementspublic reactor.core.publisher.Mono<T> readMono(ResolvableType type, ReactiveHttpInputMessage inputMessage)
HttpMessageReaderMono of the given type form the given input message, and returns it.readMono in interface HttpMessageReader<T>type - the type of object to return. This type must have previously been
passed to the canRead method of this interface, which must have
returned true.inputMessage - the HTTP input message to read fromMono of object