public class ResourceRetrievalMonitor extends TimerTask
| Constructor and Description |
|---|
ResourceRetrievalMonitor(Future<?> future,
ReliableResourceCallable reliableResourceCallable,
long monitorPeriod,
DownloadsStatusEventPublisher eventPublisher,
ResourceResponse resourceResponse,
Metacard metacard,
String downloadIdentifier) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRead()
Returns the number of bytes read from the resource's @InputStream thus far.
|
void |
run() |
cancel, scheduledExecutionTimepublic ResourceRetrievalMonitor(Future<?> future, ReliableResourceCallable reliableResourceCallable, long monitorPeriod, DownloadsStatusEventPublisher eventPublisher, ResourceResponse resourceResponse, Metacard metacard, String downloadIdentifier)
future - the @Future that started the @ReliableResourceCallable doing the resource
downloadreliableResourceCallable - the @Callable to interrupt if no bytes read in specified periodmonitorPeriod - the frequency (in ms) this monitor should check for bytes readeventPublisher - reference to the publisher of status events as the download progressesresourceResponse - the resource response of the requestmetacard - the @Metacard associated with the resource being downloadedThis work is licensed under a Creative Commons Attribution 4.0 International License.