T
-与事件关联的上下文对象的类型
public interface WatchEvent<T>
WatchService
注册一个事件或重复的事件。
一个事件是由其kind
分类有count
表示次事件已被观察到的数目。这允许重复事件的有效表示。的context
方法返回任何与事件相关的背景。在一个重复的事件的情况下,那么所有事件的上下文是相同的。
观看事件是不可变的和安全的,使用多个并发线程。
Modifier and Type | Interface and Description |
---|---|
static interface |
WatchEvent.Kind<T>
一种事件类型,用于识别的目的。
|
static interface |
WatchEvent.Modifier
一个事件的修饰,使如何
Watchable 与
WatchService 注册。
|
WatchEvent.Kind<T> kind()
int count()
1
那么这是一个重复的事件。
T context()
在ENTRY_CREATE
,ENTRY_DELETE
案例,和ENTRY_MODIFY
事件的语境是一个Path
是手表服务注册目录之间的relative
路径,和条目,创建,删除或修改。
null
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.