-
- All Superinterfaces:
Scanner.Listener
- All Known Implementing Classes:
KeyStoreScanner
- Enclosing class:
- Scanner
public static interface Scanner.DiscreteListener extends Scanner.Listener
Notification of exact file changes in the last scan.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidfileAdded(java.lang.String filename)Called when a file is added.voidfileChanged(java.lang.String filename)Called when a file is changed.voidfileRemoved(java.lang.String filename)Called when a file is removed.default voidpathAdded(java.nio.file.Path path)Called when a file is added.default voidpathChanged(java.nio.file.Path path)Called when a file is changed.default voidpathRemoved(java.nio.file.Path path)Called when a file is removed.
-
-
-
Method Detail
-
pathChanged
default void pathChanged(java.nio.file.Path path) throws java.lang.ExceptionCalled when a file is changed. Default implementation callsfileChanged(String).- Parameters:
path- thePath.toRealPath(LinkOption...)of the changed file- Throws:
java.lang.Exception- May be thrown for handling errors
-
pathAdded
default void pathAdded(java.nio.file.Path path) throws java.lang.ExceptionCalled when a file is added. Default implementation callsfileAdded(String).- Parameters:
path- thePath.toRealPath(LinkOption...)of the added file- Throws:
java.lang.Exception- May be thrown for handling errors
-
pathRemoved
default void pathRemoved(java.nio.file.Path path) throws java.lang.ExceptionCalled when a file is removed. Default implementation callsfileRemoved(String).- Parameters:
path- thePath.toRealPath(LinkOption...)of the removed file- Throws:
java.lang.Exception- May be thrown for handling errors
-
fileChanged
void fileChanged(java.lang.String filename) throws java.lang.ExceptionCalled when a file is changed. May not be called ifpathChanged(Path)is overridden.- Parameters:
filename- thePath.toRealPath(LinkOption...)as a string of the changed file- Throws:
java.lang.Exception- May be thrown for handling errors
-
fileAdded
void fileAdded(java.lang.String filename) throws java.lang.ExceptionCalled when a file is added. May not be called ifpathAdded(Path)is overridden.- Parameters:
filename- thePath.toRealPath(LinkOption...)as a string of the added file- Throws:
java.lang.Exception- May be thrown for handling errors
-
fileRemoved
void fileRemoved(java.lang.String filename) throws java.lang.ExceptionCalled when a file is removed. May not be called ifpathRemoved(Path)is overridden.- Parameters:
filename- thePath.toRealPath(LinkOption...)as a string of the removed file- Throws:
java.lang.Exception- May be thrown for handling errors
-
-