@ComponentProfile(summary="Pickup messages from the filesystem; traversing sub-directories", tag="consumer,fs,filesystem", metadata={"originalname","fsFileSize","lastmodified","fsConsumeDir","_interlokMessageConsumedFrom","fsParentDir"}, recommended=NullConnection.class) public class TraversingFsConsumer extends FsConsumer
Extension of the standard FsConsumer that traverses all subdirectories for files that match the filter expression.
In the adapter configuration file this class is aliased as traversing-fs-consumer which is the preferred alternative to the fully qualified classname when building your configuration.
AdaptrisPollingConsumer.LockOperator
fileFilter, fsWorker
log
Constructor and Description |
---|
TraversingFsConsumer() |
Modifier and Type | Method and Description |
---|---|
protected void |
prepareConsumer() |
protected int |
processFile(java.io.File f)
Attempt to process this file which might be a directory.
|
protected int |
processMessages()
If reacquire-lock-between-messages is set to true, this.reaquireLock is called after each message has been processed.
|
getResetWipFiles, getWipSuffix, init, renameFile, resetWipFiles, setResetWipFiles, setWipSuffix
addStandardMetadata, baseDirUrl, checkModified, consumeLocationKey, createAdaptrisMessage, filterExpression, getBaseDirectoryUrl, getCreateDirs, getDestination, getFileFilterImp, getFileSorter, getFilterExpression, getLogAllExceptions, getQuietInterval, isFileAccessible, logAllExceptions, newThreadName, setBaseDirectoryUrl, setCreateDirs, setDestination, setFileFilterImp, setFileSorter, setFilterExpression, setLogAllExceptions, setQuietInterval, shouldCreateDirs, verifyDirectory, withBaseDirectoryUrl, withFilterExpression
close, continueProcessingMessages, getMaxMessagesPerPoll, getPoller, getReacquireLockBetweenMessages, prepare, releaseLock, setMaxMessagesPerPoll, setPoller, setReacquireLockBetweenMessages, start, stop
changeState, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
createName, createQualifier, isTrackingEndpoint
protected int processMessages()
FsConsumerImpl
If reacquire-lock-between-messages is set to true, this.reaquireLock is called after each message has been processed. This gives other Threads (e.g. something stopping the adapter) the opportunity to obtain the lock without waiting for all messages to be processed.
processMessages
in class FsConsumerImpl
AdaptrisPollingConsumer.processMessages()
protected int processFile(java.io.File f) throws CoreException
FsConsumerImpl
processFile
in class FsConsumer
f
- the FileCoreException
- wrapping any other Exception.protected void prepareConsumer() throws CoreException
prepareConsumer
in class FsConsumerImpl
CoreException