Interface PagedDataSource<T>

  • All Superinterfaces:
    java.lang.AutoCloseable, java.util.Iterator<java.util.Collection<T>>
    All Known Implementing Classes:
    GitHubSecurityAdvisoryClient, NvdCveClient

    public interface PagedDataSource<T>
    extends java.lang.AutoCloseable, java.util.Iterator<java.util.Collection<T>>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Cleanup allocated resources.
      int getLastStatusCode()
      Returns the last HTTP Status Code received.
      java.time.ZonedDateTime getLastUpdated()
      Returns the latest updated date.
      int getTotalAvailable()
      Only available after the first call to `next()`; returns the total number of records that will be available.
      boolean hasNext()
      Returns true if there are more records available; otherwise false.
      java.util.Collection<T> next()
      Returns the next collection of vulnerability data.
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Method Detail

      • close

        void close()
            throws java.lang.Exception
        Cleanup allocated resources.
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception - thrown if there is a problem.
      • getTotalAvailable

        int getTotalAvailable()
        Only available after the first call to `next()`; returns the total number of records that will be available.
        Returns:
        the total number of records that will be returned
      • getLastStatusCode

        int getLastStatusCode()
        Returns the last HTTP Status Code received.
        Returns:
        the last HTTP Status Code received.
      • hasNext

        boolean hasNext()
        Returns true if there are more records available; otherwise false.
        Specified by:
        hasNext in interface java.util.Iterator<T>
        Returns:
        true if there are more records available; otherwise false.
      • next

        java.util.Collection<T> next()
        Returns the next collection of vulnerability data.
        Specified by:
        next in interface java.util.Iterator<T>
        Returns:
        a collection of vulnerability data.
      • getLastUpdated

        java.time.ZonedDateTime getLastUpdated()
        Returns the latest updated date.
        Returns:
        the latest updated date