Class RemoteFileFactory

    • Constructor Detail

      • RemoteFileFactory

        public RemoteFileFactory()
    • Method Detail

      • getInstance

        public static RemoteFile getInstance​(File file,
                                             boolean useChecksums,
                                             boolean fileDeletable,
                                             boolean multipleDownloads,
                                             RemoteFileSettings connectionParams)
        Create a remote file that handles the transport of the remote file data. This method is used by the sender to prepare the transport over JMS.
        Parameters:
        file - The File object to make accessable on another machine
        useChecksums - Whether transfers should be doublechecked with checksums. Added value is access to checksum of objects.
        fileDeletable - If true, the local file will be deleted when it is no longer needed.
        multipleDownloads - Whether this file should be allowed to be transferred more than once.
        Returns:
        A RemoteFile instance encapsulating the file argument.
      • getInstance

        public static RemoteFile getInstance​(File file,
                                             boolean useChecksums,
                                             boolean fileDeletable,
                                             boolean multipleDownloads)
      • getExtendedInstance

        public static RemoteFile getExtendedInstance​(org.archive.io.ArchiveRecord record)
        Get an instance connected to an ArchiveRecord. Records are not deletable so there is no concept of a "movefile" instance.
        Parameters:
        record -
        Returns:
        the file to be copied.
      • isExtendedRemoteFile

        public static boolean isExtendedRemoteFile()
        Returns true iff the defined RemoteFile class has a factory method with signature public static RemoteFile getInstance(ArchiveRecord record)
        Returns:
        true if using an extended remote file.
      • getMovefileInstance

        public static RemoteFile getMovefileInstance​(File file)
        Same as getInstance(file, false, true, false).
        Parameters:
        file - The file to move to another computer.
      • getCopyfileInstance

        public static RemoteFile getCopyfileInstance​(File file)
        Same as getInstance(file, false, false, false, null).
        Parameters:
        file - The file to copy to another computer.
      • getCopyfileInstance

        public static RemoteFile getCopyfileInstance​(File file,
                                                     RemoteFileSettings connectionParams)
        Same as getInstance(file, false, false, false, connectionParams).
        Parameters:
        file - The file to copy to another computer.
      • getDistributefileInstance

        public static RemoteFile getDistributefileInstance​(File file)
        Same as getInstance(file, false, false, false).
        Parameters:
        file - The file to copy to another computer.