Class AbstractFileWatcher

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    LessFileWatcher

    public abstract class AbstractFileWatcher
    extends java.lang.Thread
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void doOnCreate​(java.nio.file.WatchEvent<java.nio.file.Path> event, java.nio.file.Path dir)  
      protected abstract void doOnDelete​(java.nio.file.WatchEvent<java.nio.file.Path> event, java.nio.file.Path dir)  
      protected abstract void doOnModify​(java.nio.file.WatchEvent<java.nio.file.Path> event, java.nio.file.Path dir)  
      boolean isStopped()  
      void run()  
      protected void setWatchingDirectories​(java.util.Collection<java.nio.file.Path> watchingDirectories)  
      void stopThread()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractFileWatcher

        public AbstractFileWatcher()
    • Method Detail

      • isStopped

        public boolean isStopped()
      • stopThread

        public void stopThread()
      • setWatchingDirectories

        protected void setWatchingDirectories​(java.util.Collection<java.nio.file.Path> watchingDirectories)
      • doOnDelete

        protected abstract void doOnDelete​(java.nio.file.WatchEvent<java.nio.file.Path> event,
                                           java.nio.file.Path dir)
      • doOnModify

        protected abstract void doOnModify​(java.nio.file.WatchEvent<java.nio.file.Path> event,
                                           java.nio.file.Path dir)
      • doOnCreate

        protected abstract void doOnCreate​(java.nio.file.WatchEvent<java.nio.file.Path> event,
                                           java.nio.file.Path dir)
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread