Class PublicationSearcher

java.lang.Object
java.lang.Thread
host.anzo.simon.PublicationSearcher
All Implemented Interfaces:
Runnable

public class PublicationSearcher extends Thread
TODO document me
  • Constructor Details

    • PublicationSearcher

      protected PublicationSearcher(SearchProgressListener listener, int searchTime) throws IOException
      Creates a searcher instance that searches for published remote objects on the local network
      Parameters:
      listener - a SearchProgressListener implementation which is informed about the current search progress
      searchTime - the time the background search thread spends for searching published remote objects
      Throws:
      IOException
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • signalShutdown

      public void signalShutdown()
      Signals a shutdown request to the search thread.
      Note:This method does not block until shutdown is finished. It returns immediately.
    • shutdown

      public void shutdown()
      Signals a shutdown to the search thread and waits until the shutdown is processed completely. Note:This method blocks until shutdown is finished!
    • getNewPublications

      public List<SimonPublication> getNewPublications()
      Returns new found publications
      Returns:
      found publications since the last call of getNewPublications()
    • getSearchProgress

      public int getSearchProgress()
      Returns a value from 0..100 indicating the search progress. 0 is at beginning, 100 at end.
      Returns:
      value 0..100
    • isSearching

      public boolean isSearching()
      Returns if thread is still busy with searching
      Returns:
      true if search is in progress, false if search has finished.