Package com.mypurecloud.sdk.v2
Class FileWatcher
java.lang.Object
com.mypurecloud.sdk.v2.FileWatcher
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Pathprotected List<FileWatcher.FileListener>protected final Fileprotected static final List<WatchService> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddListener(FileWatcher.FileListener listener) protected booleanfullPathEndsWith(Path changed, WatchService watchService) static List<WatchService>protected voidnotifyListeners(WatchEvent.Kind<?> kind, File file) protected booleanpollEvents(WatchService watchService) removeListener(FileWatcher.FileListener listener) voidrun()protected booleansearchFiles(File parent, File[] files, String[] pathPoints, WatchService watchService) setListeners(List<FileWatcher.FileListener> listeners) voidwatch()
-
Field Details
-
listeners
-
watchServices
-
parentFolder
-
fileName
-
-
Constructor Details
-
FileWatcher
-
-
Method Details
-
watch
public void watch() -
run
public void run() -
pollEvents
- Throws:
InterruptedException
-
fullPathEndsWith
-
searchFiles
protected boolean searchFiles(File parent, File[] files, String[] pathPoints, WatchService watchService) -
notifyListeners
-
addListener
-
removeListener
-
getListeners
-
setListeners
-
getWatchServices
-