public class FileMonitor extends Object
Modifier and Type | Class and Description |
---|---|
class |
FileMonitor.FileMonitorNotifier
This is the timer thread which is executed every n milliseconds according to
the setting of the file monitor.
|
Constructor and Description |
---|
FileMonitor(long pollingInterval)
Create a file monitor instance with specified polling interval.
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(File file)
Add file to listen for.
|
void |
addListener(FileListener fileListener)
Add listener to this file monitor.
|
void |
removeFile(File file)
Remove specified file for listening.
|
void |
removeListener(FileListener fileListener)
Remove listener from this file monitor.
|
void |
start() |
void |
stop()
Stop the file monitor polling.
|
public FileMonitor(long pollingInterval)
pollingInterval
- Polling interval in milli seconds.public void stop()
public void start()
public void addFile(File file)
file
- File to listen for.public void removeFile(File file)
file
- File to remove.public void addListener(FileListener fileListener)
fileListener
- Listener to add.public void removeListener(FileListener fileListener)
fileListener
- Listener to remove.Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.