org.sadun.util.polling
Interface PollManager

All Known Implementing Classes:
BasePollManager, HistoryPollManager, SuspendablePollManager

public interface PollManager

Clients implementing this interface and registering with DirectoryPoller.addPollManager() receive method calls whenever a polling event occur.

Version:
1.0
Author:
C. Sadun

Method Summary
 void cycleEnded(CycleEndEvent evt)
          Invoked when a polling cycle has ended (the pooler is going to sleep)
 void cycleStarted(CycleStartEvent evt)
          Invoked when a polling cycle start (the pooler has just awaken)
 void directoryLookupEnded(DirectoryLookupEndEvent evt)
          Invoked when the poller has finished looking into a directory
 void directoryLookupStarted(DirectoryLookupStartEvent evt)
          Invoked when the poller is starting to look into a directory
 void exceptionDeletingTargetFile(java.io.File target)
          Invoked when an automove operation fails since the given file cannot be deleted
 void exceptionMovingFile(java.io.File file, java.io.File dest)
          Invoked when an automove operation fails since the given file cannot be moved to the given destination
 void fileFound(FileFoundEvent evt)
          Invoked for each of the files found, if setSendSingleFileEvent() has been invoked before starting the poller thread.
 void fileMoved(FileMovedEvent evt)
          If the automove mode is active, is invoked for each automatic move operation executed by the poller.
 void fileSetFound(FileSetFoundEvent evt)
          Invoked when the poller has found a set of file matching the current criteria
 

Method Detail

cycleStarted

public void cycleStarted(CycleStartEvent evt)
Invoked when a polling cycle start (the pooler has just awaken)

Parameters:
evt - the cycle start event

cycleEnded

public void cycleEnded(CycleEndEvent evt)
Invoked when a polling cycle has ended (the pooler is going to sleep)

Parameters:
evt - the cycle end event

directoryLookupStarted

public void directoryLookupStarted(DirectoryLookupStartEvent evt)
Invoked when the poller is starting to look into a directory

Parameters:
evt - the lookup start event

directoryLookupEnded

public void directoryLookupEnded(DirectoryLookupEndEvent evt)
Invoked when the poller has finished looking into a directory

Parameters:
evt - the lookup end event

fileSetFound

public void fileSetFound(FileSetFoundEvent evt)
Invoked when the poller has found a set of file matching the current criteria

Parameters:
evt - the file set found event

fileMoved

public void fileMoved(FileMovedEvent evt)
If the automove mode is active, is invoked for each automatic move operation executed by the poller.


fileFound

public void fileFound(FileFoundEvent evt)
Invoked for each of the files found, if setSendSingleFileEvent() has been invoked before starting the poller thread.

Parameters:
evt - the file set found event

exceptionDeletingTargetFile

public void exceptionDeletingTargetFile(java.io.File target)
Invoked when an automove operation fails since the given file cannot be deleted

Parameters:
target - the file that caused the exception

exceptionMovingFile

public void exceptionMovingFile(java.io.File file,
                                java.io.File dest)
Invoked when an automove operation fails since the given file cannot be moved to the given destination

Parameters:
file - the file that caused the exception
dest - the expected destination


Copyright © 1999, 2000 Cristiano Sadun. This software is released under GPL.