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
Interface for iterating over paged data sources.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleanup allocated resources.intReturns the last HTTP Status Code received.Returns the latest updated date.intOnly available after the first call to `next()`; returns the total number of records that will be available.booleanhasNext()Returnstrueif there are more records available; otherwisefalse.next()Returns the next collection of vulnerability data.Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Method Details
-
close
Cleanup allocated resources.- Specified by:
closein interfaceAutoCloseable- 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()Returnstrueif there are more records available; otherwisefalse. -
next
Collection<T> next()Returns the next collection of vulnerability data. -
getLastUpdated
ZonedDateTime getLastUpdated()Returns the latest updated date.- Returns:
- the latest updated date
-