Package org.aoju.bus.core.io.watcher
Class WatcherChain
java.lang.Object
org.aoju.bus.core.io.watcher.WatcherChain
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription加入责任链iterator()static WatcherChain创建观察者链WatcherChainvoidonCreate(WatchEvent<?> event, Path currentPath) 文件创建时执行的方法voidonDelete(WatchEvent<?> event, Path currentPath) 文件删除时执行的方法voidonModify(WatchEvent<?> event, Path currentPath) 文件修改时执行的方法 文件修改可能触发多次voidonOverflow(WatchEvent<?> event, Path currentPath) 事件丢失或出错时执行的方法Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WatcherChain
-
-
Method Details
-
of
创建观察者链WatcherChain- Parameters:
watchers- 观察者列表- Returns:
WatcherChain
-
onCreate
Description copied from interface:Watcher文件创建时执行的方法 -
onModify
Description copied from interface:Watcher文件修改时执行的方法 文件修改可能触发多次 -
onDelete
Description copied from interface:Watcher文件删除时执行的方法 -
onOverflow
Description copied from interface:Watcher事件丢失或出错时执行的方法- Specified by:
onOverflowin interfaceWatcher- Parameters:
event- 事件currentPath- 事件发生的当前Path路径
-
iterator
-
addChain
Description copied from interface:Chain加入责任链- Specified by:
addChainin interfaceChain<Watcher,WatcherChain> - Parameters:
element- 责任链新的环节元素- Returns:
- this
-