Class FtpRecursiveConsumer

  • All Implemented Interfaces:
    AdaptrisComponent, AdaptrisMessageConsumer, AdaptrisMessageWorker, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, StateManagedComponent

    @ComponentProfile(summary="Pickup messages from an FTP or SFTP server",
                      tag="consumer,ftp,ftps,sftp,recursive",
                      metadata={"originalname","fsFileSize","fsConsumeDir","_interlokMessageConsumedFrom"},
                      recommended=FileTransferConnection.class)
    public class FtpRecursiveConsumer
    extends FtpConsumer
    FTP implementation of the AdaptrisMessageConsumer interface.

    The connection type for this consumer should always be a concrete implementation of FileTransferConnection.

    The destination should be in the form in the URL form dictated by the FileTransferConnection flavour or simply the IP Address/DNS name of the target Server. If the URL form is used, then it is possible to override the username, password, and port settings of the server, in all other cases the configuration specified in the FileTransferConnection object will be used.

    In the event the proc-directory is not configured, then after processing the file, it is deleted. If proc-directory is configured, then the remote file will be renamed to this directory

    The configuration of this consumer closely mirrors that of the FsConsumer though it does not, at the moment, share any common hierarchy with a key difference; although multiple file-filters can be configured only filters that work with the filepath will work. Other filter implementations (such as those based on size /last modified) may not work.

    Unlike the original FTP consumer, this will recurse into any directories found.

    See Also:
    FtpConnection, FtpConsumer, FileTransferConnection

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