private void handleWatchEvent(final WatchEvent<Path> pathEvent) {
        final WatchEvent.Kind<Path> kind = pathEvent.kind();
        final Path affectedFile = dirToWatch.resolve(pathEvent.context())
                .normalize()
                .toAbsolutePath();
        LOGGER.debug(() -> LogUtil.message(
                "handleWatchEvent - kind: {}, affectedFile: {}", kind.name(), affectedFile));

        try {
            final EventType eventType = EventType.fromKind(kind);
            if (eventType != null
                && includedEventTypes.contains(eventType)) {

                // Add the event to our batch.
                queue.add(new SimpleWatchEvent(eventType, affectedFile));
                scheduleBatchIfRequired();
            } else {
                LOGGER.debug("Ignoring eventType: {} on affectedFile: {}", eventType, affectedFile);
            }
        } catch (Exception e) {
            LOGGER.error("Error handling watch event, kind: {}, affectedFile: {}", kind.name(), affectedFile, e);
            // Swallow error so future changes can be monitored.
        }
    }
Starts the object. Called <i>before</i> the application becomes available.
stroom-util/src/main/java/stroom/util/io/AbstractDirChangeMonitor.java