blob: c6eee2d006b6650496fd63f43b687b6caaa19b58 [file] [log] [blame]
package org.eclipse.osbp.xtext.signal.common;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
public interface IOSBPSignalWatcher {
/**
* Process all events for keys queued to the watcher.
*/
public void processEvents();
/**
* Handling method for the user to extend.
* @param ev the {@link WatchEvent}
*/
public void handleEvent(WatchEvent<Path> ev);
/**
* Register the given directory with the WatchService
* @param directory
* @param signals {@link StandardWatchEventKinds#ENTRY_CREATE} {@link StandardWatchEventKinds#ENTRY_DELETE}
* or {@link StandardWatchEventKinds#ENTRY_MODIFY} as string.
* @param combined true, if only one {@link WatchKey} for all f
* @throws IOException
*/
public void registerPathToWatcher(Path directory, String signals) throws IOException;
/**
* Register the given directory, and all its sub-directories, with the WatchService.
* @param rootpath {@link Path} the root path.
* @param signals
* @throws IOException
*/
public void registerAll(Path rootpath, String signals) throws IOException;
}