WatchService

abstract class WatchService extends AutoCloseable

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.

On the JVM this is a wrapper around java.nio.file.WatchService (class available since Java 7 for registering objects for changes and events).

Companion
object
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Abstract methods

def poll(timeout: Long, timeUnit: TimeUnit, cb: Callback[Throwable, Option[WatchKey]]): Unit
def poll(cb: Callback[Throwable, Option[WatchKey]]): Unit
def take(cb: Callback[Throwable, WatchKey]): Unit

Concrete methods

def poll(timeout: Long, timeUnit: TimeUnit): Future[Option[WatchKey]]
def poll(): Future[Option[WatchKey]]
def take(): Future[WatchKey]

Inherited methods

@throws(java.lang.Exception)
def close(): Unit
Inherited from
AutoCloseable