Java Code Examples for org.apache.commons.vfs2.FileListener#fileChanged()

The following examples show how to use org.apache.commons.vfs2.FileListener#fileChanged() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: commons-vfs   File: ChangedEvent.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void notify(final FileListener listener) throws Exception {
    listener.fileChanged(this);
}
 
Example 2
Source Project: commons-vfs   File: WeakRefFileListener.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Called when a file is changed.
 * <p>
 * This will only happen if you monitor the file using {@link org.apache.commons.vfs2.FileMonitor}.
 * </p>
 *
 * @param event The FileChangeEvent.
 * @throws Exception if an error occurs.
 */
@Override
public void fileChanged(final FileChangeEvent event) throws Exception {
    final FileListener listener = getListener();
    if (listener == null) {
        return;
    }
    listener.fileChanged(event);
}