public class WatchUtil extends Object
Constructor and Description |
---|
WatchUtil() |
Modifier and Type | Method and Description |
---|---|
static WatchMonitor |
create(File file,
int maxDepth,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(File file,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(Path path,
int maxDepth,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(Path path,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(String path,
int maxDepth,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(String path,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(URI uri,
int maxDepth,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(URI uri,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(URL url,
int maxDepth,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
create(URL url,
WatchEvent.Kind<?>... events)
创建并初始化监听
|
static WatchMonitor |
createAll(File file,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(File file,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(Path path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(Path path,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(String path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(String path,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(URI uri,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(URI uri,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(URL url,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createAll(URL url,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
createModify(File file,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(File file,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(Path path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(Path path,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(String path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(String path,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(URI uri,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(URI uri,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(URL url,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
createModify(URL url,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchKey |
register(Watchable watchable,
WatchService watcher,
WatchEvent.Kind<?>... events)
注册Watchable对象到WatchService服务
|
public static WatchMonitor create(URL url, WatchEvent.Kind<?>... events)
url
- URLevents
- 监听的事件列表public static WatchMonitor create(URL url, int maxDepth, WatchEvent.Kind<?>... events)
url
- URLevents
- 监听的事件列表maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录public static WatchMonitor create(URI uri, WatchEvent.Kind<?>... events)
uri
- URIevents
- 监听的事件列表public static WatchMonitor create(URI uri, int maxDepth, WatchEvent.Kind<?>... events)
uri
- URIevents
- 监听的事件列表maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录public static WatchMonitor create(File file, WatchEvent.Kind<?>... events)
file
- 文件events
- 监听的事件列表public static WatchMonitor create(File file, int maxDepth, WatchEvent.Kind<?>... events)
file
- 文件events
- 监听的事件列表maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录public static WatchMonitor create(String path, WatchEvent.Kind<?>... events)
path
- 路径events
- 监听的事件列表public static WatchMonitor create(String path, int maxDepth, WatchEvent.Kind<?>... events)
path
- 路径events
- 监听的事件列表maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录public static WatchMonitor create(Path path, WatchEvent.Kind<?>... events)
path
- 路径events
- 监听事件列表public static WatchMonitor create(Path path, int maxDepth, WatchEvent.Kind<?>... events)
path
- 路径events
- 监听事件列表maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录public static WatchMonitor createAll(URL url, Watcher watcher)
url
- URLwatcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(URL url, int maxDepth, Watcher watcher)
url
- URLmaxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(URI uri, Watcher watcher)
uri
- URIwatcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(URI uri, int maxDepth, Watcher watcher)
uri
- URImaxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(File file, Watcher watcher)
file
- 被监听文件watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(File file, int maxDepth, Watcher watcher)
file
- 被监听文件maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(String path, Watcher watcher)
path
- 路径watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(String path, int maxDepth, Watcher watcher)
path
- 路径maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(Path path, Watcher watcher)
path
- 路径watcher
- Watcher
WatchMonitor
public static WatchMonitor createAll(Path path, int maxDepth, Watcher watcher)
path
- 路径maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(URL url, Watcher watcher)
url
- URLwatcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(URL url, int maxDepth, Watcher watcher)
url
- URLmaxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(URI uri, Watcher watcher)
uri
- URIwatcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(URI uri, int maxDepth, Watcher watcher)
uri
- URImaxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(File file, Watcher watcher)
file
- 被监听文件watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(File file, int maxDepth, Watcher watcher)
file
- 被监听文件maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(String path, Watcher watcher)
path
- 路径watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(String path, int maxDepth, Watcher watcher)
path
- 路径maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(Path path, Watcher watcher)
path
- 路径watcher
- Watcher
WatchMonitor
public static WatchMonitor createModify(Path path, int maxDepth, Watcher watcher)
path
- 路径maxDepth
- 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录watcher
- Watcher
WatchMonitor
public static WatchKey register(Watchable watchable, WatchService watcher, WatchEvent.Kind<?>... events)
watchable
- 可注册对象watcher
- WatchService对象events
- 监听事件WatchKey
Copyright © 2021. All rights reserved.