@ThreadSafe public class ProcessTask extends Object implements Callable<ProcessTask>
| Constructor and Description |
|---|
ProcessTask(CveDB cveDB,
DownloadTask downloadTask,
Settings settings)
Constructs a new ProcessTask used to process an NVD CVE update.
|
| Modifier and Type | Method and Description |
|---|---|
ProcessTask |
call()
Implements the callable interface.
|
UpdateException |
getException()
Get the value of exception.
|
protected void |
importJSON(File file)
Imports the NVD CVE JSON File into the database.
|
void |
setException(UpdateException exception)
Set the value of exception.
|
public ProcessTask(CveDB cveDB, DownloadTask downloadTask, Settings settings)
cveDB - the data store objectdownloadTask - the download task that contains the URL references to
downloadsettings - 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.public UpdateException getException()
public void setException(UpdateException exception)
exception - new value of exceptionpublic ProcessTask call() throws Exception
call in interface Callable<ProcessTask>Exception - thrown if there is an exception; note that any
UpdateExceptions are simply added to the tasks exception collectionprotected void importJSON(File file) throws ParserConfigurationException, IOException, SQLException, DatabaseException, ClassNotFoundException, UpdateException
file - the file containing the NVD CVE JSONParserConfigurationException - is thrown if there is a parser
configuration exceptionIOException - is thrown if there is a IO ExceptionSQLException - is thrown if there is a SQL exceptionDatabaseException - is thrown if there is a database exceptionClassNotFoundException - thrown if the h2 database driver cannot be
loadedUpdateException - thrown if the file could not be foundCopyright © 2012–2020 OWASP. All rights reserved.