Package engineering.swat.watch.impl
Interface EventHandlingWatch
-
- All Superinterfaces:
ActiveWatch
,AutoCloseable
,Closeable
- All Known Implementing Classes:
JDKBaseWatch
,JDKDirectoryWatch
,JDKFileTreeWatch
,JDKFileWatch
public interface EventHandlingWatch extends ActiveWatch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
handleEvent(WatchEvent event)
Handles `event`.default WatchEvent
relativize(WatchEvent event)
Relativizes the full path of `event` against the path watched by this watch (as per `getPath()`).-
Methods inherited from interface engineering.swat.watch.ActiveWatch
getPath, getScope
-
-
-
-
Method Detail
-
handleEvent
void handleEvent(WatchEvent event)
Handles `event`. The purpose of this method is to trigger the event handler of this watch "from the outside" (in addition to having native file system libraries trigger the event handler "from the inside"). This is useful to report synthetic events (e.g., while handling overflows).
-
relativize
default WatchEvent relativize(WatchEvent event)
Relativizes the full path of `event` against the path watched by this watch (as per `getPath()`). Returns a new event whose root path and relative path are set in accordance with the relativization.
-
-