| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sadun.util.polling.BasePollManager
org.sadun.util.polling.ScriptedPollManager
A PollManager that hands over the actual 
 handling of polling events to an external script.
 
The scripts are executed by invoking System.execute() with a given shell command.
By default, win32 invocation uses %COMMSPEC% and Unix invocation uses /bin/sh.
| Constructor Summary | |
ScriptedPollManager(DirectoryPoller poller,
                    java.lang.String scriptPath)
 | 
|
ScriptedPollManager(DirectoryPoller poller,
                    java.lang.String[] shellCmd,
                    java.lang.String scriptPath)
 | 
|
| 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  | 
static void | 
main(java.lang.String[] args)
 | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public ScriptedPollManager(DirectoryPoller poller,
                           java.lang.String[] shellCmd,
                           java.lang.String scriptPath)
public ScriptedPollManager(DirectoryPoller poller,
                           java.lang.String scriptPath)
                    throws java.lang.UnsupportedOperationException
| Method Detail | 
public java.lang.String toString()
public void cycleEnded(CycleEndEvent evt)
PollManager
cycleEnded in interface PollManagercycleEnded in class BasePollManagerPollManager.cycleEnded(org.sadun.util.polling.CycleEndEvent)public void cycleStarted(CycleStartEvent evt)
PollManager
cycleStarted in interface PollManagercycleStarted in class BasePollManagerPollManager.cycleStarted(org.sadun.util.polling.CycleStartEvent)public void directoryLookupEnded(DirectoryLookupEndEvent evt)
PollManager
directoryLookupEnded in interface PollManagerdirectoryLookupEnded in class BasePollManagerPollManager.directoryLookupEnded(org.sadun.util.polling.DirectoryLookupEndEvent)public void directoryLookupStarted(DirectoryLookupStartEvent evt)
PollManager
directoryLookupStarted in interface PollManagerdirectoryLookupStarted in class BasePollManagerPollManager.directoryLookupStarted(org.sadun.util.polling.DirectoryLookupStartEvent)public void exceptionDeletingTargetFile(java.io.File target)
PollManager
exceptionDeletingTargetFile in interface PollManagerexceptionDeletingTargetFile in class BasePollManagerPollManager.exceptionDeletingTargetFile(java.io.File)
public void exceptionMovingFile(java.io.File file,
                                java.io.File dest)
PollManager
exceptionMovingFile in interface PollManagerexceptionMovingFile in class BasePollManagerPollManager.exceptionMovingFile(java.io.File, java.io.File)public void fileFound(FileFoundEvent evt)
PollManagersetSendSingleFileEvent()
 has been invoked before starting the poller thread.
fileFound in interface PollManagerfileFound in class BasePollManagerPollManager.fileFound(org.sadun.util.polling.FileFoundEvent)public void fileMoved(FileMovedEvent evt)
PollManager
fileMoved in interface PollManagerfileMoved in class BasePollManagerPollManager.fileMoved(org.sadun.util.polling.FileMovedEvent)public void fileSetFound(FileSetFoundEvent evt)
PollManager
fileSetFound in interface PollManagerfileSetFound in class BasePollManagerPollManager.fileSetFound(org.sadun.util.polling.FileSetFoundEvent)
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||