public abstract class AbstractDirectoryWatcher extends Object
| Modifier and Type | Field and Description |
|---|---|
private Path |
directory |
private Set<WatchEvent.Kind> |
kinds |
private static org.slf4j.Logger |
LOGGER |
private Duration |
pollInterval |
private WatchService |
watchService |
| Constructor and Description |
|---|
AbstractDirectoryWatcher(Path directory,
Duration pollInterval,
Set<WatchEvent.Kind> kinds) |
AbstractDirectoryWatcher(WatchService watchService,
Path directory,
Duration pollInterval,
Set<WatchEvent.Kind> kinds) |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract void |
handleEvent(WatchEvent<?> event,
Path path) |
void |
poll() |
private static final org.slf4j.Logger LOGGER
private final WatchService watchService
private final Duration pollInterval
private final Path directory
private final Set<WatchEvent.Kind> kinds
public AbstractDirectoryWatcher(Path directory, Duration pollInterval, Set<WatchEvent.Kind> kinds) throws IOException
IOExceptionAbstractDirectoryWatcher(WatchService watchService, Path directory, Duration pollInterval, Set<WatchEvent.Kind> kinds) throws IOException
IOExceptionpublic void poll()
throws InterruptedException,
IOException
InterruptedExceptionIOExceptionabstract void handleEvent(WatchEvent<?> event, Path path) throws IOException
IOExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.