Class ConnectorServiceV1.AsyncJobReader<T>

  • All Implemented Interfaces:
    Connector<T>, ItemReader<T>, Serializable
    Enclosing class:
    ConnectorServiceV1

    public abstract static class ConnectorServiceV1.AsyncJobReader<T>
    extends Object
    implements Connector<T>, ItemReader<T>
    Reads items from the Cognite API. This reader targets API endpoints which complete its operation over two requests. I.e. async api pattern where the first request starts the job and the second request collects the result. The reader works in two steps: 1. Issue a "start job" request. 2. Start a polling loop issuing "get job results/status" requests. The "start job" step is executed using the input Request, the configured RequestProvider "jobStartRequestProvider" and the configured JobStartResponseParser. This request will typically yield a response which contains the async job identification parameters (jobId, modelId, etc.). These identification parameters are again used as input for step 2, "get job results". The output from step 1 is a Request object representing the parameters to be used as input to step 2, "get job results/update". The Request is interpreted by the JobResultRequestProvider and the api will regularly be polled for job results. When the api provides job results, this response is routed to the ResponseParser and returned.
    See Also:
    Serialized Form