Interface DirectoryChangeListener

  • All Known Implementing Classes:
    ChangeSetListener, OnTimeoutListener
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface DirectoryChangeListener
    A listener that is called when file change events occur or when exceptions occur while watching.
    • Method Detail

      • onEvent

        void onEvent​(DirectoryChangeEvent event)
              throws java.io.IOException
        Throws:
        java.io.IOException
      • isWatching

        default boolean isWatching()
        The watcher will stop watching after this method returns false.
      • onIdle

        default void onIdle​(int count)
      • onException

        default void onException​(java.lang.Exception e)
        A handler for uncaught exceptions. Throwing an exception from here will terminate the watcher.