Interface KeyFilesSearchReceiver

All Known Implementing Classes:
KeySearchingExample

public interface KeyFilesSearchReceiver
Interface for classes which want to use the key files searcher. The concurrently running autonomous thread (searcher) communicates its results to its users through this interface.

How to use the key files searcher:

The KeyFilesSeacher is activated by invoking "KeyFilesSearcher.createInstance(receiver)" where "receiver" must be the instance of a class which implements this "KeyFilesSearchReceiver" interface.

This receiver class acts as a manager of keys. To do this, it must create an instance of the "KeyFiles" class. This will be a list of all currently available keys. If the "KeyFilesSearcher" has performed a search, it will also pass an instance of the "KeyFiles" class to the receiver class via the method "synchronizeKeyFilesList" with the keys it has found, so that the receiver can synchronize its key list.

  • Method Summary

    Modifier and Type
    Method
    Description
    Request the hash map with key files from the key file search receiver.
    boolean
    Tells the key file searcher that searching for keys is allowed.
    void
    Passes a list of file paths of the currently existing key bundle folders to the key file search receiver.
    void
    Passes a list of key file locations objects to the key file search receiver.
    void
    Informs the key file search receiver that the key files searcher is currently searching for keys.
    void
    Passes a hash map with found key files to the key file search receiver for it can synchronize its own hash map with key files.
  • Method Details

    • synchronizeKeyFilesList

      void synchronizeKeyFilesList(KeyFiles files)
      Passes a hash map with found key files to the key file search receiver for it can synchronize its own hash map with key files.
      Parameters:
      files - a hash map with found key files.
    • getKeyFiles

      KeyFiles getKeyFiles()
      Request the hash map with key files from the key file search receiver.
      Returns:
      the hash map with key files.
    • setKeyFileLocations

      void setKeyFileLocations(ArrayList<KeyFileLocation> keyFileLocations)
      Passes a list of key file locations objects to the key file search receiver.
      Parameters:
      keyFileLocations - an array list with key file locations objects.
    • setKeyFileSearching

      void setKeyFileSearching(boolean b)
      Informs the key file search receiver that the key files searcher is currently searching for keys.
      Parameters:
      b - true, if the key files searcher is currently searching for keys.
    • setBundleFolders

      void setBundleFolders(ArrayList<File> bundleFolders)
      Passes a list of file paths of the currently existing key bundle folders to the key file search receiver.
      Parameters:
      bundleFolders - an array list with paths to existing bundle folders.
    • isSearchingAllowed

      boolean isSearchingAllowed()
      Tells the key file searcher that searching for keys is allowed.
      Returns:
      true, if searching for keys is allowed.