Class DownloadTask
- java.lang.Object
-
- org.owasp.dependencycheck.data.update.nvd.api.DownloadTask
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.util.concurrent.Future<NvdApiProcessor>>
@ThreadSafe public class DownloadTask extends java.lang.Object implements java.util.concurrent.Callable<java.util.concurrent.Future<NvdApiProcessor>>
A callable object to download the NVD API cache files and start the NvdApiProcessor.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description DownloadTask(java.lang.String url, java.util.concurrent.ExecutorService processor, CveDB cveDB, Settings settings)Simple constructor for the callable download task.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Future<NvdApiProcessor>call()booleanisModified()Returns true if the process task is for the modified json file from the NVD API Cache.
-
-
-
Constructor Detail
-
DownloadTask
public DownloadTask(java.lang.String url, java.util.concurrent.ExecutorService processor, CveDB cveDB, Settings settings)Simple constructor for the callable download task.- Parameters:
url- the file to downloadprocessor- 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.
-
-
Method Detail
-
call
public java.util.concurrent.Future<NvdApiProcessor> call() throws java.lang.Exception
- Specified by:
callin interfacejava.util.concurrent.Callable<java.util.concurrent.Future<NvdApiProcessor>>- Throws:
java.lang.Exception
-
isModified
public boolean isModified()
Returns true if the process task is for the modified json file from the NVD API Cache.- Returns:
trueif the process task is for the modified data; otherwisefalse
-
-