public class WatcherChain extends java.lang.Object implements Watcher, Chain<Watcher,WatcherChain>
| 构造器和说明 |
|---|
WatcherChain(Watcher... watchers)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
WatcherChain |
addChain(Watcher element)
加入责任链
|
static WatcherChain |
create(Watcher... watchers)
创建观察者链
WatcherChain |
java.util.Iterator<Watcher> |
iterator() |
void |
onCreate(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
文件创建时执行的方法
|
void |
onDelete(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
文件删除时执行的方法
|
void |
onModify(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
文件修改时执行的方法
文件修改可能触发多次 |
void |
onOverflow(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
事件丢失或出错时执行的方法
|
public WatcherChain(Watcher... watchers)
watchers - 观察者列表public static WatcherChain create(Watcher... watchers)
WatcherChainwatchers - 观察者列表WatcherChainpublic void onCreate(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
Watcherpublic void onModify(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
Watcherpublic void onDelete(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
Watcherpublic void onOverflow(java.nio.file.WatchEvent<?> event,
java.nio.file.Path currentPath)
WatcheronOverflow 在接口中 Watcherevent - 事件currentPath - 事件发生的当前Path路径public java.util.Iterator<Watcher> iterator()
iterator 在接口中 java.lang.Iterable<Watcher>public WatcherChain addChain(Watcher element)
ChainaddChain 在接口中 Chain<Watcher,WatcherChain>element - 责任链新的环节元素Copyright © 2018. All rights reserved.