Class NonDeletingFsConsumer

  • All Implemented Interfaces:
    AdaptrisComponent, AdaptrisMessageConsumer, AdaptrisMessageWorker, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, StateManagedComponent
    Direct Known Subclasses:
    MovingNonDeletingFsConsumer

    @ComponentProfile(summary="Pickup messages from the filesystem without deleting them afterwards",
                      tag="consumer,fs,filesystem",
                      metadata={"originalname","fsFileSize","lastmodified","fsConsumeDir","_interlokMessageConsumedFrom","fsParentDir"},
                      recommended=NullConnection.class)
    public class NonDeletingFsConsumer
    extends FsConsumerImpl

    File system implementation of AdaptrisMessageConsumer based on the com.adaptris.fs package.

    This differs from the standard implementation of FsConsumer in that it processes the file 'in-situ' and does not delete the file after processing. To avoid constantly re-processing the same file over and over again, you can configure a ProcessedItemCache which stores the last modified timestamp of the file and only re-processes the file if it changes.

    The configured Destination may return a string in one of two formats

    • If a 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 qualified
    • If just a path is returned, then it is considered to be relative to the current working directory. e.g. if /opt/fred is used, and the adapter is installed to /opt/adapter, then the fully qualified name is /opt/adapter/opt/fred.

    On windows based platforms, you should always use a file based url.

    In the adapter configuration file this class is aliased as non-deleting-fs-consumer which is the preferred alternative to the fully qualified classname when building your configuration.