Class RecordDataSource<T>
java.lang.Object
io.github.jeremylong.openvulnerability.client.RecordDataSource<T>
- Type Parameters:
T- the data type
- All Implemented Interfaces:
AutoCloseable,Iterator<T>
A simple wrapper around a PagedDataSource that iterates over single objects rather than a page at a time.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRecordDataSource(PagedDataSource<T> source) Constructs a new RecordDataSource wrapping the given paged data source. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
source
-
current
-
-
Constructor Details
-
RecordDataSource
Constructs a new RecordDataSource wrapping the given paged data source.- Parameters:
source- the paged data source to wrap
-
-
Method Details
-
close
Closes the underlying data source and releases resources.- Specified by:
closein interfaceAutoCloseable- Throws:
Exception- if an error occurs while closing
-
getLastUpdated
Returns the latest updated date.- Returns:
- the latest updated date
-
getLastStatusCode
public int getLastStatusCode()Returns the last HTTP Status Code received.- Returns:
- the last HTTP Status Code received.
-
hasNext
public boolean hasNext()Returns true if there are more records available. -
next
Returns the next record.
-