public interface HttpMessageReader<T>
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(ResolvableType elementType,
MediaType mediaType)
Indicates whether the given class can be read by this converter.
|
java.util.List<MediaType> |
getReadableMediaTypes()
Return the list of
MediaType objects that can be read by this converter. |
<any> |
read(ResolvableType elementType,
ReactiveHttpInputMessage inputMessage,
java.util.Map<java.lang.String,java.lang.Object> hints)
Read a
Flux of the given type form the given input message, and returns it. |
<any> |
readMono(ResolvableType elementType,
ReactiveHttpInputMessage inputMessage,
java.util.Map<java.lang.String,java.lang.Object> hints)
Read a
Mono of the given type form the given input message, and returns it. |
boolean canRead(ResolvableType elementType, MediaType mediaType)
elementType
- the stream element 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
otherwise<any> read(ResolvableType elementType, ReactiveHttpInputMessage inputMessage, java.util.Map<java.lang.String,java.lang.Object> hints)
Flux
of the given type form the given input message, and returns it.elementType
- the stream element type 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 fromhints
- additional information about how to read the bodyFlux
of elements<any> readMono(ResolvableType elementType, ReactiveHttpInputMessage inputMessage, java.util.Map<java.lang.String,java.lang.Object> hints)
Mono
of the given type form the given input message, and returns it.elementType
- the stream element type 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 fromhints
- additional information about how to read the bodyMono
of object