Package discord4j.rest.http
Class JacksonReaderStrategy<T>
java.lang.Object
discord4j.rest.http.JacksonReaderStrategy<T>
- Type Parameters:
T- the type of object in the read response
- All Implemented Interfaces:
ReaderStrategy<T>
Read a response into JSON and convert to an Object of type
<Res> using Jackson.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JacksonReaderStrategy
-
-
Method Details
-
canRead
Description copied from interface:ReaderStrategyWhether the given object type is supported by this reader.- Specified by:
canReadin interfaceReaderStrategy<T>- Parameters:
type- the type of object to checkcontentType- the content type for the read- Returns:
trueif readable,falseotherwise
-
read
Description copied from interface:ReaderStrategyRead from the input message and encode to a single object.- Specified by:
readin interfaceReaderStrategy<T>- Parameters:
content- the response contentsresponseType- the type of object in the response which must have been previously checked viaReaderStrategy.canRead(Class, String)- Returns:
- a Mono for the resolved response, according to the given response type
-