Interface RegisterableWatchService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.nio.file.WatchKey register​(java.nio.file.Path path, java.nio.file.WatchEvent.Kind<?>... kinds)
      Register a path for monitoring.
      • Methods inherited from interface java.nio.file.WatchService

        close, poll, poll, take
    • Method Detail

      • register

        java.nio.file.WatchKey register​(java.nio.file.Path path,
                                        java.nio.file.WatchEvent.Kind<?>... kinds)
                                 throws java.io.IOException
        Register a path for monitoring.
        Parameters:
        path - The path to monitor.
        kinds - The types of events to monitor.
        Returns:
        WatchKey the key returned by the WatchService
        Throws:
        java.io.IOException - when the path cannot be registered