@ThreadSafe public class DownloadTask extends Object implements Callable<Future<ProcessTask>>
| Constructor and Description |
|---|
DownloadTask(NvdCveInfo nvdCveInfo,
ExecutorService processor,
CveDB cveDB,
Settings settings)
Simple constructor for the callable download task.
|
| Modifier and Type | Method and Description |
|---|---|
Future<ProcessTask> |
call() |
void |
cleanup()
Attempts to delete the files that were downloaded.
|
File |
getFile()
Get the value of file.
|
NvdCveInfo |
getNvdCveInfo()
Get the value of nvdCveInfo.
|
boolean |
isModified()
Returns true if the process task is for the modified json file from the
NVD.
|
void |
setNvdCveInfo(NvdCveInfo nvdCveInfo)
Set the value of nvdCveInfo.
|
public DownloadTask(NvdCveInfo nvdCveInfo, ExecutorService processor, CveDB cveDB, Settings settings) throws UpdateException
nvdCveInfo - the NVD CVE infoprocessor - the processor service to submit the downloaded files tocveDB - the CVE DB to use to store the vulnerability datasettings - a reference to the global settings object; this is
necessary so that when the thread is started the dependencies have a
correct reference to the global settings.UpdateException - thrown if temporary files could not be createdpublic NvdCveInfo getNvdCveInfo()
public void setNvdCveInfo(NvdCveInfo nvdCveInfo)
nvdCveInfo - new value of nvdCveInfopublic File getFile()
public Future<ProcessTask> call() throws Exception
call in interface Callable<Future<ProcessTask>>Exceptionpublic void cleanup()
public boolean isModified()
true if the process task is for the modified data;
otherwise falseCopyright © 2012–2020 OWASP. All rights reserved.