org.diirt.datasource.file.FileWatcherService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasource-file Show documentation
Show all versions of datasource-file Show documentation
Support for data source based on file updates.
/**
* Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
package org.diirt.datasource.file;
import java.io.File;
/**
* Allows to register for notification for file changes.
*
* @author carcassi
*/
interface FileWatcherService {
/**
* Registers a file for updates.
*
* @param file a file
* @param callback called when the file changes
*/
public void addWatcher(File file, Runnable callback);
/**
* Unregisters a file for updates.
*
* @param file a file
* @param callback no longer called when the file changes
*/
public void removeWatcher(File file, Runnable callback);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy