org.sadun.util.polling.pollmanagers
Class HistoryPollManager

java.lang.Object
  extended byorg.sadun.util.polling.pollmanagers.HistoryPollManager
All Implemented Interfaces:
PollManager
Direct Known Subclasses:
FileHistoryPollManager, LoggerHistoryPollManager

public abstract class HistoryPollManager
extends java.lang.Object
implements PollManager

A PollManager which simply keeps a journal of events and processed files.

This class is abstract as it doesn't identify the device where to store the information.

Author:
Cristiano Sadun

Constructor Summary
HistoryPollManager()
           
 
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
protected abstract  void storeAutomoveException(java.lang.Exception e, java.io.File target)
           
protected abstract  void storeEvent(BasePollerEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryPollManager

public HistoryPollManager()
Method Detail

cycleEnded

public void cycleEnded(CycleEndEvent evt)
Description copied from interface: PollManager
Invoked when a polling cycle has ended (the pooler is going to sleep)

Specified by:
cycleEnded in interface PollManager
Parameters:
evt - the cycle end event

cycleStarted

public void cycleStarted(CycleStartEvent evt)
Description copied from interface: PollManager
Invoked when a polling cycle start (the pooler has just awaken)

Specified by:
cycleStarted in interface PollManager
Parameters:
evt - the cycle start event

directoryLookupEnded

public void directoryLookupEnded(DirectoryLookupEndEvent evt)
Description copied from interface: PollManager
Invoked when the poller has finished looking into a directory

Specified by:
directoryLookupEnded in interface PollManager
Parameters:
evt - the lookup end event

directoryLookupStarted

public void directoryLookupStarted(DirectoryLookupStartEvent evt)
Description copied from interface: PollManager
Invoked when the poller is starting to look into a directory

Specified by:
directoryLookupStarted in interface PollManager
Parameters:
evt - the lookup start event

exceptionDeletingTargetFile

public void exceptionDeletingTargetFile(java.io.File target)
Description copied from interface: PollManager
Invoked when an automove operation fails since the given file cannot be deleted

Specified by:
exceptionDeletingTargetFile in interface PollManager
Parameters:
target - the file that caused the exception

exceptionMovingFile

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

Specified by:
exceptionMovingFile in interface PollManager
Parameters:
file - the file that caused the exception
dest - the expected destination

fileFound

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

Specified by:
fileFound in interface PollManager
Parameters:
evt - the file set found event

fileMoved

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

Specified by:
fileMoved in interface PollManager

fileSetFound

public void fileSetFound(FileSetFoundEvent evt)
Description copied from interface: PollManager
Invoked when the poller has found a set of file matching the current criteria

Specified by:
fileSetFound in interface PollManager
Parameters:
evt - the file set found event

storeEvent

protected abstract void storeEvent(BasePollerEvent evt)

storeAutomoveException

protected abstract void storeAutomoveException(java.lang.Exception e,
                                               java.io.File target)


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