Class DirPoll
java.lang.Object
org.jpos.util.SimpleLogSource
org.jpos.util.DirPoll
- All Implemented Interfaces:
FilenameFilter, Runnable, Configurable, Destroyable, LogSource
public class DirPoll
extends SimpleLogSource
implements Runnable, FilenameFilter, Configurable, Destroyable
DirPoll operates on a set of directories which defaults to
- request
- response
- tmp
- run
- bad
- archive
- Since:
- jPOS 1.2.7
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic interfaceclass -
Field Summary
FieldsFields inherited from class SimpleLogSource
logger, realm -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidaddPriority(String fileExtension) voidvoiddestroy()protected Fileprotected FilegetPath()longReturn instance implementingDirPoll.FileProcessororDirPoll.Processorprotected Fileprotected Fileprotected Fileprotected FilebooleanisPaused()booleanvoidpause()voidrun()protected Filescan()voidsetAcceptZeroLength(boolean acceptZeroLength) voidsetArchiveDateFormat(String dateFormat) voidsetArchiveDir(String dir) voidvoidDirPool receives Configuration requests and pass along them to the underlying processor.voidvoidsetPollInterval(long pollInterval) voidsetPriorities(String priorities) voidsetProcessor(Object processor) voidsetRegexPriorityMatching(boolean regexPriorityMatching) voidsetRequestDir(String dir) voidsetResponseDir(String dir) voidsetResponseSuffix(String suffix) voidvoidsetShouldArchive(boolean shouldArchive) voidsetShouldCompressArchive(boolean shouldCompressArchive) voidsetShouldTimestampArchive(boolean shouldTimestampArchive) voidsetThreadPool(ExecutorService executor) voidvoidunpause()
-
Field Details
-
cfg
-
-
Constructor Details
-
DirPoll
public DirPoll()
-
-
Method Details
-
setPath
-
setShouldTimestampArchive
-
setArchiveDateFormat
-
setShouldArchive
-
setShouldCompressArchive
-
setAcceptZeroLength
-
getPath
-
setRequestDir
-
setResponseDir
-
setTmpDir
-
setBadDir
-
setRunDir
-
setArchiveDir
-
setPollInterval
-
setResponseSuffix
-
getPollInterval
-
setProcessor
-
getRequestDir
-
getResponseDir
-
getTmpDir
-
getBadDir
-
getRunDir
-
getArchiveDir
-
isRegexPriorityMatching
-
setRegexPriorityMatching
-
getProcessor
Return instance implementingDirPoll.FileProcessororDirPoll.Processor- Returns:
- Object - need to be casted to
DirPoll.FileProcessororDirPoll.Processor
-
setConfiguration
DirPool receives Configuration requests and pass along them to the underlying processor.- Specified by:
setConfigurationin interfaceConfigurable- Parameters:
cfg- Configuration object- Throws:
ConfigurationException- on errors
-
setPriorities
- Parameters:
priorities- blank separated list of extensions
-
setThreadPool
-
accept
- Specified by:
acceptin interfaceFilenameFilter
-
run
-
destroy
- Specified by:
destroyin interfaceDestroyable
-
createDirs
-
addPriority
-
scan
-
pause
-
unpause
-
isPaused
-