Package com.cognite.client.servicesV1
Interface ItemReader<T>
-
- Type Parameters:
T-
- All Known Implementing Classes:
ConnectorServiceV1.AsyncJobReader,ConnectorServiceV1.SingleRequestItemReader
public interface ItemReader<T>An interface that defines the basic interface for calling a Cognite API endpoint with a request and consuming the response.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResponseItems<T>getItems(Request requestParameters)Executes a request against the api endpoint.CompletableFuture<ResponseItems<T>>getItemsAsync(Request requestParameters)Executes a request against the api endpoint on a separate thread.
-
-
-
Method Detail
-
getItems
ResponseItems<T> getItems(Request requestParameters) throws Exception
Executes a request against the api endpoint. This method will block until the request is completed and the response can be consumed by the client.- Parameters:
requestParameters-- Returns:
- Throws:
Exception
-
getItemsAsync
CompletableFuture<ResponseItems<T>> getItemsAsync(Request requestParameters) throws Exception
Executes a request against the api endpoint on a separate thread. The response is wrapped in a future that is returned to the client immediately.- Parameters:
requestParameters-- Returns:
- Throws:
Exception
-
-