T - the type of object in the read responsepublic interface ReaderStrategy<T>
HttpClientResponse and decoding the stream of bytes
to an Object of type <Res>.| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> type,
String contentType)
Whether the given object type is supported by this reader.
|
Mono<T> |
read(Mono<ByteBuf> content,
Class<T> responseType)
Read from the input message and encode to a single object.
|
boolean canRead(@Nullable Class<?> type, @Nullable String contentType)
type - the type of object to checkcontentType - the content type for the readtrue if readable, false otherwiseMono<T> read(Mono<ByteBuf> content, Class<T> responseType)
content - the response contentsresponseType - the type of object in the response which must have been previously checked via canRead(Class, String)