Res - the type of object in the read responsepublic class JacksonReaderStrategy<Res> extends Object implements ReaderStrategy<Res>
<Res> using Jackson 2.9.| Constructor and Description |
|---|
JacksonReaderStrategy(ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> type,
String contentType)
Whether the given object type is supported by this reader.
|
Mono<Res> |
read(ByteBufMono content,
Class<Res> responseType)
Read from the input message and encode to a single object.
|
public JacksonReaderStrategy(ObjectMapper objectMapper)
public boolean canRead(@Nullable Class<?> type, @Nullable String contentType)
ReaderStrategycanRead in interface ReaderStrategy<Res>type - the type of object to checkcontentType - the content type for the readtrue if readable, false otherwisepublic Mono<Res> read(ByteBufMono content, Class<Res> responseType)
ReaderStrategyread in interface ReaderStrategy<Res>content - the response contentsresponseType - the type of object in the response which must have been previously checked via ReaderStrategy.canRead(Class, String)