WatchService

Interface WatchService

All Superinterfaces:
AutoCloseable, Closeable
public interface WatchService
extends Closeable

A watch service that watches registered objects for changes and events. For example a file manager may use a watch service to monitor a directory for changes so that it can update its display of the list of files when files are created or deleted.

A Watchable object is registered with a watch service by invoking its register method, returning a 登录查看完整内容