Class TSPointsProtoResponseParser

  • All Implemented Interfaces:
    ResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>

    public abstract class TSPointsProtoResponseParser
    extends Object
    implements ResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>
    • Constructor Detail

      • TSPointsProtoResponseParser

        public TSPointsProtoResponseParser()
    • Method Detail

      • getRequest

        public abstract Request getRequest()
      • extractNextCursor

        public Optional<String> extractNextCursor​(byte[] payload)
                                           throws Exception
        Extracts the start timestamp for the next iteration of timestamp points. The cursor is a json object with each TS *externalId* (or id, if no externalId exists) mapped to the next *start* timestamp.
        Specified by:
        extractNextCursor in interface ResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>
        Parameters:
        payload - The response body
        Returns:
        Throws:
        Exception
        IOException
      • extractItems

        public com.google.common.collect.ImmutableList<com.cognite.v1.timeseries.proto.DataPointListItem> extractItems​(byte[] payload)
                                                                                                                throws Exception
        Extract the results items from a response body.
        Specified by:
        extractItems in interface ResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>
        Parameters:
        payload - The reponse body
        Returns:
        Throws:
        Exception