Package org.apache.commons.vfs2.impl
Class DefaultFileMonitor.FileMonitorAgent
- java.lang.Object
-
- org.apache.commons.vfs2.impl.DefaultFileMonitor.FileMonitorAgent
-
- Enclosing class:
- DefaultFileMonitor
private static final class DefaultFileMonitor.FileMonitorAgent extends java.lang.Object
File monitor agent.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<FileName,java.lang.Object>
children
private DefaultFileMonitor
defaultFileMonitor
private boolean
exists
private FileObject
fileObject
private long
timestamp
-
Constructor Summary
Constructors Modifier Constructor Description private
FileMonitorAgent(DefaultFileMonitor fm, FileObject file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
check()
private void
checkForNewChildren()
Only checks for new children.private void
fireAllCreate(FileObject child)
Recursively fires create events for all children if recursive descent is enabled.private void
refresh()
Clear the cache and re-request the file objectprivate void
resetChildrenList()
-
-
-
Field Detail
-
fileObject
private final FileObject fileObject
-
defaultFileMonitor
private final DefaultFileMonitor defaultFileMonitor
-
exists
private boolean exists
-
timestamp
private long timestamp
-
children
private java.util.Map<FileName,java.lang.Object> children
-
-
Constructor Detail
-
FileMonitorAgent
private FileMonitorAgent(DefaultFileMonitor fm, FileObject file)
-
-
Method Detail
-
resetChildrenList
private void resetChildrenList()
-
refresh
private void refresh()
Clear the cache and re-request the file object
-
fireAllCreate
private void fireAllCreate(FileObject child)
Recursively fires create events for all children if recursive descent is enabled. Otherwise the create event is only fired for the initial FileObject.- Parameters:
child
- The child to add.
-
checkForNewChildren
private void checkForNewChildren()
Only checks for new children. If children are removed, they'll eventually be checked.
-
check
private void check()
-
-