public class WeakRefFileListener extends Object implements FileListener
| Modifier | Constructor and Description |
|---|---|
protected |
WeakRefFileListener(FileObject file,
FileListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
fileChanged(FileChangeEvent event)
Called when a file is changed.
|
void |
fileCreated(FileChangeEvent event)
Called when a file is created.
|
void |
fileDeleted(FileChangeEvent event)
Called when a file is deleted.
|
protected FileListener |
getListener()
returns the wrapped listener.
|
static void |
installListener(FileObject file,
FileListener listener)
This will install the
listener at the given file. |
protected WeakRefFileListener(FileObject file, FileListener listener)
public static void installListener(FileObject file, FileListener listener)
listener at the given file.file - The FileObject to listen on.listener - The FileListenerprotected FileListener getListener() throws Exception
Exception - if an error occurs.public void fileCreated(FileChangeEvent event) throws Exception
fileCreated in interface FileListenerevent - The FileChangeEvent.Exception - if an error occurs.public void fileDeleted(FileChangeEvent event) throws Exception
fileDeleted in interface FileListenerevent - The FileChangeEvent.Exception - if an error occurs.public void fileChanged(FileChangeEvent event) throws Exception
This will only happen if you monitor the file using FileMonitor.
fileChanged in interface FileListenerevent - The FileChangeEvent.Exception - if an error occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.