All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.diirt.datasource.file.FileWatcherService Maven / Gradle / Ivy

There is a newer version: 3.1.7
Show newest version
/**
 * 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