Class DeliverBatchCommand

  • All Implemented Interfaces:
    org.ikasan.connector.base.command.TransactionalResourceCommand, org.ikasan.connector.listener.TransactionCommitFailureObserverable

    public class DeliverBatchCommand
    extends AbstractBaseFileTransferTransactionalResourceCommand
    Delivers a batch of files via file transfer
    Author:
    Ikasan Development Team
    • Constructor Detail

      • DeliverBatchCommand

        public DeliverBatchCommand​(java.lang.String outputDirectory,
                                   boolean overwriteExisting)
        Constructor
        Parameters:
        outputDirectory - The directory we're delivering to
        overwriteExisting - Whether we overwrite existing files or not
    • Method Detail

      • doCommit

        protected void doCommit()
                         throws javax.resource.ResourceException
        (non-Javadoc) Needs to move everything out of the temp directory to which it was delivered, to its final destination
        Specified by:
        doCommit in class org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
        Throws:
        javax.resource.ResourceException
        See Also:
        AbstractTransactionalResourceCommand.doCommit()
      • doRollback

        protected void doRollback()
                           throws javax.resource.ResourceException
        Specified by:
        doRollback in class org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
        Throws:
        javax.resource.ResourceException
      • getTempDirectory

        public java.lang.String getTempDirectory()
        Returns:
        tempDirectory
      • getBatchFolder

        public java.lang.String getBatchFolder()
        Returns:
        batchFolder
      • setIdGenerator

        public void setIdGenerator​(UniqueIdGenerator idGenerator)
        allows the default id generator to be overridden
        Parameters:
        idGenerator - The id generator
      • isPutAttempted

        public boolean isPutAttempted()
        Accessor for putAttempted
        Returns:
        putAttempted