org.apache.commons.jci.listeners
Class AbstractFilesystemAlterationListener
java.lang.Object
org.apache.commons.jci.listeners.AbstractFilesystemAlterationListener
- All Implemented Interfaces:
- FilesystemAlterationListener
- Direct Known Subclasses:
- FileChangeListener, ReloadingListener
public abstract class AbstractFilesystemAlterationListener
- extends Object
- implements FilesystemAlterationListener
AbstractFilesystemAlterationListener provides some convenience methods helping to
implement a FilesystemAlterationListener.
- Author:
- tcurdt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
observer
protected FilesystemAlterationObserver observer
AbstractFilesystemAlterationListener
public AbstractFilesystemAlterationListener()
onDirectoryCreate
public void onDirectoryCreate(File pDir)
- Specified by:
onDirectoryCreate
in interface FilesystemAlterationListener
onDirectoryChange
public void onDirectoryChange(File pDir)
- Specified by:
onDirectoryChange
in interface FilesystemAlterationListener
onDirectoryDelete
public void onDirectoryDelete(File pDir)
- Specified by:
onDirectoryDelete
in interface FilesystemAlterationListener
onFileCreate
public void onFileCreate(File pFile)
- Specified by:
onFileCreate
in interface FilesystemAlterationListener
onFileChange
public void onFileChange(File pFile)
- Specified by:
onFileChange
in interface FilesystemAlterationListener
onFileDelete
public void onFileDelete(File pFile)
- Specified by:
onFileDelete
in interface FilesystemAlterationListener
getChangedDirectories
public Collection getChangedDirectories()
getChangedFiles
public Collection getChangedFiles()
getCreatedDirectories
public Collection getCreatedDirectories()
getCreatedFiles
public Collection getCreatedFiles()
getDeletedDirectories
public Collection getDeletedDirectories()
getDeletedFiles
public Collection getDeletedFiles()
signals
protected void signals()
onStart
public void onStart(FilesystemAlterationObserver pObserver)
- Specified by:
onStart
in interface FilesystemAlterationListener
onStop
public void onStop(FilesystemAlterationObserver pObserver)
- Specified by:
onStop
in interface FilesystemAlterationListener
waitForEvent
public void waitForEvent()
throws Exception
- Throws:
Exception
waitForFirstCheck
public void waitForFirstCheck()
throws Exception
- we don't reset the signal so if there was a check it is
already true and exit immediatly otherwise it will behave just
like waitForCheck()
- Throws:
Exception
- in case of a timeout
waitForCheck
public void waitForCheck()
throws Exception
- wait for the next filesystem check to happen
- Throws:
Exception
- in case of a timeout
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.