com.hs.mail.smtp.spool
Class FileWatcher

java.lang.Object
  extended by com.hs.mail.smtp.spool.FileWatcher
All Implemented Interfaces:
Watcher
Direct Known Subclasses:
SpoolRepository

public class FileWatcher
extends Object
implements Watcher

Class to watch files under some conditions

Since:
Jun 3, 2010
Author:
Won Chul Doh

Constructor Summary
FileWatcher()
           
 
Method Summary
 List<Consumer> getConsumers()
           
 long getWatchInterval()
           
 void setConsumers(List<Consumer> consumers)
           
 void setFailureDir(String failureDir)
           
 void setFileComparator(Comparator<File> fileComparator)
           
 void setTarget(String target)
           
 void setTargetDir(File targetDir)
           
 void setWatchInterval(long millis)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWatcher

public FileWatcher()
Method Detail

getWatchInterval

public long getWatchInterval()
Specified by:
getWatchInterval in interface Watcher

setWatchInterval

public void setWatchInterval(long millis)
Specified by:
setWatchInterval in interface Watcher

getConsumers

public List<Consumer> getConsumers()
Specified by:
getConsumers in interface Watcher

setConsumers

public void setConsumers(List<Consumer> consumers)
Specified by:
setConsumers in interface Watcher

setTarget

public void setTarget(String target)

setTargetDir

public void setTargetDir(File targetDir)

setFailureDir

public void setFailureDir(String failureDir)

setFileComparator

public void setFileComparator(Comparator<File> fileComparator)

start

public void start()
Specified by:
start in interface Watcher


Copyright © 2011. All Rights Reserved.