public class DirPoll extends SimpleLogSource implements java.lang.Runnable, java.io.FilenameFilter, Configurable, Destroyable
Modifier and Type | Class and Description |
---|---|
static class |
DirPoll.DirPollException |
static interface |
DirPoll.FileProcessor |
static interface |
DirPoll.Processor |
class |
DirPoll.ProcessorRunner |
logger, realm
Constructor and Description |
---|
DirPoll() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String name) |
void |
addPriority(java.lang.String fileExtension) |
void |
createDirs() |
void |
destroy() |
protected java.io.File |
getArchiveDir() |
protected java.io.File |
getBadDir() |
java.lang.String |
getPath() |
long |
getPollInterval() |
java.lang.Object |
getProcessor()
Return instance implementing
DirPoll.FileProcessor or DirPoll.Processor |
protected java.io.File |
getRequestDir() |
protected java.io.File |
getResponseDir() |
protected java.io.File |
getRunDir() |
protected java.io.File |
getTmpDir() |
boolean |
isPaused() |
boolean |
isRegexPriorityMatching() |
void |
pause() |
void |
run() |
protected java.io.File |
scan() |
void |
setAcceptZeroLength(boolean acceptZeroLength) |
void |
setArchiveDateFormat(java.lang.String dateFormat) |
void |
setArchiveDir(java.lang.String dir) |
void |
setBadDir(java.lang.String dir) |
void |
setConfiguration(Configuration cfg)
DirPool receives Configuration requests
and pass along them to the underlying processor.
|
void |
setPath(java.lang.String base) |
void |
setPollInterval(long pollInterval) |
void |
setPriorities(java.lang.String priorities) |
void |
setProcessor(java.lang.Object processor) |
void |
setRegexPriorityMatching(boolean regexPriorityMatching) |
void |
setRequestDir(java.lang.String dir) |
void |
setResponseDir(java.lang.String dir) |
void |
setResponseSuffix(java.lang.String suffix) |
void |
setRunDir(java.lang.String dir) |
void |
setShouldArchive(boolean shouldArchive) |
void |
setShouldCompressArchive(boolean shouldCompressArchive) |
void |
setShouldTimestampArchive(boolean shouldTimestampArchive) |
void |
setThreadPool(ThreadPool pool) |
void |
setTmpDir(java.lang.String dir) |
void |
unpause() |
public void setPath(java.lang.String base)
public void setShouldTimestampArchive(boolean shouldTimestampArchive)
public void setArchiveDateFormat(java.lang.String dateFormat)
public void setShouldArchive(boolean shouldArchive)
public void setShouldCompressArchive(boolean shouldCompressArchive)
public void setAcceptZeroLength(boolean acceptZeroLength)
public java.lang.String getPath()
public void setRequestDir(java.lang.String dir)
public void setResponseDir(java.lang.String dir)
public void setTmpDir(java.lang.String dir)
public void setBadDir(java.lang.String dir)
public void setRunDir(java.lang.String dir)
public void setArchiveDir(java.lang.String dir)
public void setPollInterval(long pollInterval)
public void setResponseSuffix(java.lang.String suffix)
public long getPollInterval()
public void setProcessor(java.lang.Object processor)
protected java.io.File getRequestDir()
protected java.io.File getResponseDir()
protected java.io.File getTmpDir()
protected java.io.File getBadDir()
protected java.io.File getRunDir()
protected java.io.File getArchiveDir()
public boolean isRegexPriorityMatching()
public void setRegexPriorityMatching(boolean regexPriorityMatching)
public java.lang.Object getProcessor()
DirPoll.FileProcessor
or DirPoll.Processor
DirPoll.FileProcessor
or DirPoll.Processor
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
cfg
- Configuration objectConfigurationException
- on errorspublic void setPriorities(java.lang.String priorities)
priorities
- blank separated list of extensionspublic void setThreadPool(ThreadPool pool)
public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.FilenameFilter
public void run()
run
in interface java.lang.Runnable
public void destroy()
destroy
in interface Destroyable
public void createDirs()
public void addPriority(java.lang.String fileExtension)
protected java.io.File scan()
public void pause()
public void unpause()
public boolean isPaused()