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 voidclose()Cleanup allocated resources.intgetLastStatusCode()Returns the last HTTP Status Code received.java.time.ZonedDateTimegetLastUpdated()Returns the latest updated date.intgetTotalAvailable()Only 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.java.util.Collection<T>next()Returns the next collection of vulnerability data.
-
-
-
Method Detail
-
close
void close() throws java.lang.ExceptionCleanup allocated resources.- Specified by:
closein interfacejava.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()
Returnstrueif there are more records available; otherwisefalse.- Specified by:
hasNextin interfacejava.util.Iterator<T>- Returns:
trueif there are more records available; otherwisefalse.
-
next
java.util.Collection<T> next()
Returns the next collection of vulnerability data.- Specified by:
nextin interfacejava.util.Iterator<T>- Returns:
- a collection of vulnerability data.
-
getLastUpdated
java.time.ZonedDateTime getLastUpdated()
Returns the latest updated date.- Returns:
- the latest updated date
-
-