public class FallbackReaderStrategy extends Object implements ReaderStrategy<Object>
String as a catch-all, unless the given response type is ErrorResponse, in which
case it will attempt to store the response into the ErrorResponse body field.| Constructor and Description |
|---|
FallbackReaderStrategy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> type,
String contentType)
Whether the given object type is supported by this reader.
|
Mono<Object> |
read(ByteBufMono content,
Class<Object> responseType)
Read from the input message and encode to a single object.
|
public boolean canRead(@Nullable Class<?> type, @Nullable String contentType)
ReaderStrategycanRead in interface ReaderStrategy<Object>type - the type of object to checkcontentType - the content type for the readtrue if readable, false otherwisepublic Mono<Object> read(ByteBufMono content, Class<Object> responseType)
ReaderStrategyread in interface ReaderStrategy<Object>content - the response contentsresponseType - the type of object in the response which must have been previously checked via ReaderStrategy.canRead(Class, String)