Class IgnoreWatcher

java.lang.Object
org.aoju.bus.core.io.watcher.IgnoreWatcher
All Implemented Interfaces:
Watcher
Direct Known Subclasses:
LineReadWatcher, SimpleWatcher

public class IgnoreWatcher extends Object implements Watcher
跳过所有事件处理Watcher 用户继承此类后实现需要监听的方法
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • IgnoreWatcher

      public IgnoreWatcher()
  • Method Details

    • onCreate

      public void onCreate(WatchEvent<?> event, Path currentPath)
      Description copied from interface: Watcher
      文件创建时执行的方法
      Specified by:
      onCreate in interface Watcher
      Parameters:
      event - 事件
      currentPath - 事件发生的当前Path路径
    • onModify

      public void onModify(WatchEvent<?> event, Path currentPath)
      Description copied from interface: Watcher
      文件修改时执行的方法 文件修改可能触发多次
      Specified by:
      onModify in interface Watcher
      Parameters:
      event - 事件
      currentPath - 事件发生的当前Path路径
    • onDelete

      public void onDelete(WatchEvent<?> event, Path currentPath)
      Description copied from interface: Watcher
      文件删除时执行的方法
      Specified by:
      onDelete in interface Watcher
      Parameters:
      event - 事件
      currentPath - 事件发生的当前Path路径
    • onOverflow

      public void onOverflow(WatchEvent<?> event, Path currentPath)
      Description copied from interface: Watcher
      事件丢失或出错时执行的方法
      Specified by:
      onOverflow in interface Watcher
      Parameters:
      event - 事件
      currentPath - 事件发生的当前Path路径