Package gov.usgs.util
Interface Poller
- All Known Implementing Classes:
DirectoryPoller
public interface Poller
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFileListener
(FileListenerInterface listener) void
notifyListeners
(File file) Notify all listeners that files exist and need to be processed.void
removeFileListener
(FileListenerInterface listener) void
start()
Start polling in a background thread.void
stop()
Stop any currently scheduled polling.
-
Method Details
-
addFileListener
- Parameters:
listener
- FileListenerInterface to add
-
removeFileListener
- 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
Notify all listeners that files exist and need to be processed.- Parameters:
file
- that needs to be processed
-