public interface DataSource<U,V>
Data sources act as brokers of information, fetching a response of one type, using a request of another type. For example, a data source may take a URI instance, call the associated external web service, and return an InputStream containing the response body.
DataSource 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
V execute(U u, Client client) throws DataSourceException
u
- The query intermediate form.client
- The client performing the request.DataSourceException
- The wrapper error for any errors encountered while attempting to retrieve data.