Interface TransferReceiver

  • All Known Implementing Classes:
    RepoTransferReceiverImpl

    public interface TransferReceiver
    Author:
    brian The server side Transfer Receiver.
    • Method Detail

      • getStagingFolder

        File getStagingFolder​(String transferId)
        Parameters:
        transferId - String
        Returns:
        File
      • getTempFolder

        NodeRef getTempFolder​(String transferId)
        Parameters:
        transferId - String
        Returns:
        NodeRef
      • start

        String start​(String fromRepositoryId,
                     boolean allowTransferToSelf,
                     TransferVersion fromVersion)
              throws TransferException
        Asks the receiver to setup a new transfer.
        Parameters:
        fromRepositoryId - the repositoryId of the sending system
        allowTransferToSelf - are transfers to the same repository allowed?
        fromVersion - the version sending
        Returns:
        The identifier of the new transfer
        Throws:
        TransferException - if an error occurred while setting up the transfer
      • end

        void end​(String transferId)
          throws TransferException
        Asks the receiver to end (and clean up) the specified transfer
        Parameters:
        transferId - The transfer to end
        Throws:
        TransferException - If the process of ending the transfer fails
      • saveSnapshot

        void saveSnapshot​(String transferId,
                          InputStream snapshotStream)
                   throws TransferException
        Store the specified snapshot file into the transfer staging area. The specified transfer must currently be the holder of the transfer lock, otherwise an exception is thrown. This operation does not close the supplied stream, so the caller must do it as appropriate. The caller should assume that the supplied stream has been fully read when this operation returns.
        Parameters:
        transferId - The identifier of the transfer with which this snapshot is associated
        snapshotStream - The open stream that holds the snapshot file.
        Throws:
        TransferException - If an error occurs while saving the snapshot file.
      • generateRequsite

        void generateRequsite​(String transferId,
                              OutputStream requsiteStream)
                       throws TransferException
        Write the requsite (the bits required to support the Manifest) to the output stream.
        Parameters:
        requsiteStream - an open stream to receive the requisite
        Throws:
        TransferException
      • getVersion

        TransferVersion getVersion()
        Get the version that we are transfering to.
      • getTransferReport

        InputStream getTransferReport​(String transferId)
        get the transfer report for the specified transfer
        Parameters:
        transferId - String
      • setTransferRootNode

        void setTransferRootNode​(String rootFileSystem)
        set the root node for the file system receiver
        Parameters:
        rootFileSystem - String