public interface ResponseDecoder<R extends Response<?>,V>
Response decoders transform the raw response data from a compatible DataSource instance, and return a standardized Response. For example, they may take an InputStream of JSON and parse it into native data objects.
ResponseDecoder is part of the ResultFinder pipeline.
ResultFinder
instances link
together the dataflow of the conversion of a
Query
to a
Response
via the following steps:
Query
is transformed to an intermediate form via a QueryCoder
,DataSource
, andResponse
via a ResponseDecoder
ResultFinder
,
ResultFinderImpl
,
QueryCoder
,
DataSource
,
ResponseDecoder
,
Response
R decode(V responseData, Client client) throws ResponseDecoderException
responseData
- The raw response data.client
- The associated Client.ResponseDecoderException
- The wrapper for any errors encountered while attempting this transformation.