All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.darylteo.nio.PollingDirectoryWatchService Maven / Gradle / Ivy

Go to download

Watch and receive notifications on filesystem changes using Java 7 NIO's WatchService

The newest version!
package com.darylteo.nio;

import java.io.IOException;

/**
 * 

* This implementation of DirectoryWatchService provides a mechanism for polling for changes. *

* * @author Daryl Teo * @see AbstractDirectoryWatchService * @see DirectoryWatcher */ public class PollingDirectoryWatchService extends AbstractDirectoryWatchService { public PollingDirectoryWatchService() throws IOException { super(); } /** * Notifies all subscribers or any file system changes (if any) */ public void poll() { super.handleWatchKey(super.getWatchService().poll()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy