@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
CONFIRMATION_ID_KEY
Constructor and Description |
---|
TraversingFsConsumer() |
TraversingFsConsumer(ConsumeDestination d) |
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, checkModified, consumeLocationKey, createAdaptrisMessage, getCreateDirs, getFileFilterImp, getFileSorter, getLogAllExceptions, getQuietInterval, isFileAccessible, logAllExceptions, setCreateDirs, setFileFilterImp, setFileSorter, setLogAllExceptions, setQuietInterval, shouldCreateDirs, verifyDirectory
close, continueProcessingMessages, getMaxMessagesPerPoll, getPoller, getReacquireLockBetweenMessages, prepare, releaseLock, setMaxMessagesPerPoll, setPoller, setReacquireLockBetweenMessages, start, stop
changeState, getDestination, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
createName, createQualifier, isTrackingEndpoint
public TraversingFsConsumer()
public TraversingFsConsumer(ConsumeDestination d)
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 FsConsumer
CoreException