@Immutable public final class NopWatchService extends Object implements WatchService
WatchService implementation
As its name tells, this implementation will never return any WatchKeys. This means that if you try and take() from it, you will
sleep forever until the watch service is closed, and will be greeted with a
ClosedWatchServiceException.
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface WatchServiceIOExceptionpublic WatchKey poll()
poll in interface WatchServicepublic WatchKey poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface WatchServiceInterruptedExceptionpublic WatchKey take() throws InterruptedException
take in interface WatchServiceInterruptedExceptionpublic Path getPath()