Package gov.usgs.util

Interface Poller

All Known Implementing Classes:
DirectoryPoller

public interface Poller
  • Method Details

    • addFileListener

      void addFileListener(FileListenerInterface listener)
      Parameters:
      listener - FileListenerInterface to add
    • removeFileListener

      void removeFileListener(FileListenerInterface listener)
      Parameters:
      listener - FileListenerInterface to remove
    • start

      void start()
      Start polling in a background thread. Any previously scheduled polling is stopped before starting at this frequency. This schedules using fixed-delay (time between complete polls) as opposed to fixed-rate (how often to start polling).
    • stop

      void stop()
      Stop any currently scheduled polling.
    • notifyListeners

      void notifyListeners(File file)
      Notify all listeners that files exist and need to be processed.
      Parameters:
      file - that needs to be processed