dk.netarkivet.common.distribute
Class RemoteFileFactory

java.lang.Object
  extended by dk.netarkivet.common.utils.SettingsFactory<RemoteFile>
      extended by dk.netarkivet.common.distribute.RemoteFileFactory

public class RemoteFileFactory
extends SettingsFactory<RemoteFile>

Factory for creating remote files.


Constructor Summary
RemoteFileFactory()
           
 
Method Summary
static RemoteFile getCopyfileInstance(java.io.File file)
          Same as getInstance(file, false, false, false).
static RemoteFile getDistributefileInstance(java.io.File file)
          Same as getInstance(file, false, false, false).
static RemoteFile getInstance(java.io.File file, boolean useChecksums, boolean fileDeletable, boolean multipleDownloads)
          Create a remote file that handles the transport of the remote file data.
static RemoteFile getMovefileInstance(java.io.File file)
          Same as getInstance(file, false, true, false).
 
Methods inherited from class dk.netarkivet.common.utils.SettingsFactory
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteFileFactory

public RemoteFileFactory()
Method Detail

getInstance

public static RemoteFile getInstance(java.io.File file,
                                     boolean useChecksums,
                                     boolean fileDeletable,
                                     boolean multipleDownloads)
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.

getMovefileInstance

public static RemoteFile getMovefileInstance(java.io.File file)
Same as getInstance(file, false, true, false).

Parameters:
file - The file to move to another computer.

getCopyfileInstance

public static RemoteFile getCopyfileInstance(java.io.File file)
Same as getInstance(file, false, false, false).

Parameters:
file - The file to copy to another computer.

getDistributefileInstance

public static RemoteFile getDistributefileInstance(java.io.File file)
Same as getInstance(file, false, false, false).

Parameters:
file - The file to copy to another computer.