public class FileWatchEventSource extends EventSourceBase<java.nio.file.Path>
FileWatchService
is required to do the actual watching.FileWatchService
.
FileWatch
,
Trigger
,
When
Constructor and Description |
---|
FileWatchEventSource() |
Modifier and Type | Method and Description |
---|---|
protected Restore |
doStart(java.util.function.Consumer<? super EventOf<java.nio.file.Path>> consumer) |
java.nio.file.Path |
getFile() |
FileWatch |
getFileWatch() |
java.time.Instant |
getLastModified() |
void |
setFile(java.nio.file.Path file) |
void |
setFileWatch(FileWatch fileWatch) |
fireDestroyedState, getStateChanger, hardReset, iconHelper, onHardReset, onReset, onSoftReset, setStateException, softReset, start, stateHandler
configure, getName, logger, logger, loggerName, save, setName, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onDestroy, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession
protected Restore doStart(java.util.function.Consumer<? super EventOf<java.nio.file.Path>> consumer) throws java.io.IOException
doStart
in class EventSourceBase<java.nio.file.Path>
java.io.IOException
public java.nio.file.Path getFile()
public void setFile(java.nio.file.Path file)
public FileWatch getFileWatch()
public void setFileWatch(FileWatch fileWatch)
public java.time.Instant getLastModified()