Package org.oddjob.io
Class FileWatchEventSource
java.lang.Object
org.oddjob.io.FileWatchEventSource
- All Implemented Interfaces:
EventSource<InstantEvent<Path>>
- Author:
- rob
- See Also:
Description
Watch for a file and fire an event if/when it exists. A service such asFileWatchService is required to do the actual watching.Example
SeeFileWatchService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFile()voidvoidsetFileWatch(FileWatch fileWatch) subscribe(Consumer<? super InstantEvent<Path>> consumer) toString()
-
Constructor Details
-
FileWatchEventSource
public FileWatchEventSource()
-
-
Method Details
-
subscribe
- Specified by:
subscribein interfaceEventSource<InstantEvent<Path>>
-
getFile
-
setFile
-
getFileWatch
-
setFileWatch
-
toString
-