Interface PagedDataSource<T>

Type Parameters:
T - the type of data in the source
All Superinterfaces:
AutoCloseable, Iterator<Collection<T>>
All Known Implementing Classes:
GitHubSecurityAdvisoryClient, NvdCveClient

public interface PagedDataSource<T> extends AutoCloseable, Iterator<Collection<T>>
Interface for iterating over paged data sources.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cleanup allocated resources.
    int
    Returns the last HTTP Status Code received.
    Returns the latest updated date.
    int
    Only available after the first call to `next()`; returns the total number of records that will be available.
    boolean
    Returns true if there are more records available; otherwise false.
    Returns the next collection of vulnerability data.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, remove
  • Method Details

    • close

      void close() throws Exception
      Cleanup allocated resources.
      Specified by:
      close in interface AutoCloseable
      Throws:
      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 Iterator<T>
      Returns:
      true if there are more records available; otherwise false.
    • next

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

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