public class WatchServiceWrapper extends Object implements Closeable
WatchService specified.| Constructor and Description |
|---|
WatchServiceWrapper(FileSystem pFs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
WatchKey |
register(Path pDirectory)
Registers the path specified with the
WatchService held by this object. |
WatchKey |
take()
See
WatchService.take(). |
String |
toString() |
public WatchServiceWrapper(FileSystem pFs) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic WatchKey take() throws InterruptedException
WatchService.take().InterruptedExceptionpublic WatchKey register(Path pDirectory) throws IOException
WatchService held by this object.
If the path specified is not a directory, an UncheckedIOException will be caused to be thrown.pDirectory - Directory to be watched, must not be nullIOException - Thrown, if the registration of the directory specified with the watch service failed.Copyright © 2017 SourcePond. All rights reserved.