Class NvdApiProcessor

  • All Implemented Interfaces:
    java.util.concurrent.Callable<NvdApiProcessor>

    public class NvdApiProcessor
    extends java.lang.Object
    implements java.util.concurrent.Callable<NvdApiProcessor>
    Stores a collection of NVD CVE Data from the NVD API into the database.
    Author:
    Jeremy Long
    • Constructor Summary

      Constructors 
      Constructor Description
      NvdApiProcessor​(CveDB cveDB, java.io.File jsonFile)
      Create a new processor to put the NVD data into the database.
      NvdApiProcessor​(CveDB cveDB, java.io.File jsonFile, long startTime)
      Create a new processor to put the NVD data into the database.
    • Constructor Detail

      • NvdApiProcessor

        public NvdApiProcessor​(CveDB cveDB,
                               java.io.File jsonFile,
                               long startTime)
        Create a new processor to put the NVD data into the database.
        Parameters:
        cveDB - a reference to the database.
        jsonFile - the JSON data file to inject.
        startTime - the start time of the update process.
      • NvdApiProcessor

        public NvdApiProcessor​(CveDB cveDB,
                               java.io.File jsonFile)
        Create a new processor to put the NVD data into the database.
        Parameters:
        cveDB - a reference to the database
        jsonFile - the JSON data file to inject.
    • Method Detail

      • call

        public NvdApiProcessor call()
                             throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<NvdApiProcessor>
        Throws:
        java.lang.Exception
      • getDurationMillis

        public long getDurationMillis()
        Calculates how long the update process took.
        Returns:
        the number of milliseconds that the update process took