@ComponentProfile(summary="Pickup messages from the filesystem with large message support", tag="consumer,fs,filesystem", metadata={"originalname","lastmodified","fsFileSize","fsConsumeDir","fsParentDir"}, recommended=NullConnection.class) public class LargeFsConsumer extends FsConsumer
File system implementation of AdaptrisMessageConsumer
with large message support.
The configured ConsumeDestination
may return a string in one of two formats
file
based url is used. e.g. file:///c:/path/to/my/directory or file:////path/to/my/directory then the
patch is considered to be fully qualifiedOn windows based platforms, you should always use a file based url.
Additionally the behaviour of this consumer is subtly different from the standard FsConsumer
:
FileBackedMimeEncoder
.FileBackedMessageFactory
FsConsumer
and uses the configured FsWorkerIn the adapter configuration file this class is aliased as large-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 |
---|
LargeFsConsumer() |
LargeFsConsumer(ConsumeDestination d) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
void |
init()
Initialises the component.
|
protected int |
processFile(java.io.File originalFile)
Attempt to process this file which might be a directory.
|
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
getResetWipFiles, getWipSuffix, prepareConsumer, renameFile, resetWipFiles, setResetWipFiles, setWipSuffix
addStandardMetadata, checkModified, createAdaptrisMessage, getCreateDirs, getFileFilterImp, getFileSorter, getLogAllExceptions, getQuietInterval, isFileAccessible, logAllExceptions, processMessages, setCreateDirs, setFileFilterImp, setFileSorter, setLogAllExceptions, setQuietInterval, shouldCreateDirs, verifyDirectory
continueProcessingMessages, continueProcessingMessages, getMaxMessagesPerPoll, getPoller, getReacquireLockBetweenMessages, prepare, releaseLock, setMaxMessagesPerPoll, setPoller, setReacquireLockBetweenMessages
changeState, getDestination, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsConfirmation, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isConfirmation, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsConfirmation, 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, isConfirmation, isTrackingEndpoint
public LargeFsConsumer()
public LargeFsConsumer(ConsumeDestination d)
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
init
in class FsConsumer
CoreException
- wrapping any underlying Exception
sComponentLifecycle.init()
public void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.
start
in interface ComponentLifecycle
start
in class AdaptrisPollingConsumer
CoreException
- wrapping any underlying Exception
sComponentLifecycle.start()
public void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing a
RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
stop
in class AdaptrisPollingConsumer
ComponentLifecycle.stop()
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely.
Throwing a RuntimeException
may cause unintended consequences
close
in interface ComponentLifecycle
close
in class AdaptrisPollingConsumer
ComponentLifecycle.close()
protected int processFile(java.io.File originalFile) throws CoreException
FsConsumerImpl
processFile
in class FsConsumer
originalFile
- the FileCoreException
- wrapping any other Exception.