public interface QueryCoder<Q extends Query,U>
Query coders serve to transform/translate a Query into an intermediate form that is compatible with the DataSource. For example, one may change the query into a URI for later execution against an external web service.
QueryCoder 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
U encode(Q query, Client client) throws QueryCoderException
query
- The query.client
- The client performing the query.QueryCoderException
- The wrapper for any errors encountered while attempting this transformation.