Class LargeFsProducer

  • All Implemented Interfaces:
    AdaptrisComponent, AdaptrisMessageProducer, AdaptrisMessageSender, AdaptrisMessageWorker, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator

    @ComponentProfile(summary="Write the current message to the filesystem with large message support",
                      tag="producer,fs,filesystem",
                      recommended=NullConnection.class,
                      metadata={"producedname","fsProduceDir"})
    public class LargeFsProducer
    extends FsProducer

    File system implementation of AdaptrisMessageProducer with large message support.

    *

    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.

    Additionally the behaviour of this consumer is subtly different from the standard FsProducer :

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

    • Constructor Detail

      • LargeFsProducer

        public LargeFsProducer()
    • Method Detail

      • write

        protected void write​(AdaptrisMessage msg,
                             java.io.File destFile)
                      throws java.lang.Exception
        Overrides:
        write in class FsProducer
        Throws:
        java.lang.Exception
      • getUseRenameTo

        public java.lang.Boolean getUseRenameTo()
        Returns:
        the useRenameTo value.
      • setUseRenameTo

        public void setUseRenameTo​(java.lang.Boolean b)
        Set to true to simply use File.renameTo(File) when producing an AdaptrisMessage that is an instance of FileBackedMessage
        Parameters:
        b - true to use File.renameTo(File)