Class KeyFilesSearcher

java.lang.Object
java.lang.Thread
de.das.encrypter.tools.BaseThread
de.das.encrypter.processors.KeyFilesSearcher
All Implemented Interfaces:
Runnable

public class KeyFilesSearcher extends BaseThread
The searcher scans periodicaly all drives since letter "C" and looks for folders named "Bundle". Then looks for possible key files contained in the found folders. The found key files will be synchronized with the current content of the key files list provided by the search receiver.
  • Method Details

    • createInstance

      public static void createInstance(KeyFilesSearchReceiver searchReceiver)
      Creates and starts an instance of a key files searcher. Only one searcher can be used for key files. If an instance has already been created, further calls to this method will have no effect. This instance runs with the default period of 10 seconds.
      Parameters:
      searchReceiver - instance of a class which implements the interface KeyFilesSearchReceiver.
    • createInstance

      public static void createInstance(KeyFilesSearchReceiver searchReceiver, int period)
      Creates and starts an instance of a key files searcher. Only one searcher can be used for key files. If an instance has already been created, further calls to this method will have no effect.
      Parameters:
      searchReceiver - instance of a class which implements the interface KeyFilesSearchReceiver.
      period - the time in seconds between two searchings.
    • doTask

      public void doTask()
      Performs a new search for keys if the search is not currently running and the key file search receiver allows the search. If a new search starts and ends, the key file search receiver is notified.
      Specified by:
      doTask in class BaseThread