Interface TransferProgressMonitor

All Known Implementing Classes:
AbstractTransferProgressMonitor, LoggingTransferProgressMonitorImpl, RepoTransferProgressMonitorImpl

public interface TransferProgressMonitor
Author:
brian The transfer progress monitor monitors each transfer

It contains a status, current position, end position, and a log. It can also store an exception.

  • Method Details

    • logComment

      void logComment(String transferId, Object obj) throws TransferException
      log an ad-hoc message
      Parameters:
      transferId - String
      obj - Object
      Throws:
      TransferException
    • logException

      void logException(String transferId, Object obj, Throwable ex) throws TransferException
      log an ad-hoc message and an exception
      Parameters:
      transferId - String
      obj - Object
      ex - Throwable
      Throws:
      TransferException
    • logCreated

      void logCreated(String transferId, NodeRef sourceNode, NodeRef destNode, NodeRef newParent, String newPath, boolean orphan)
      Log the creation of a new node
      Parameters:
      transferId - String
      sourceNode - NodeRef
      destNode - NodeRef
      newPath - String
      orphan - boolean
    • logUpdated

      void logUpdated(String transferId, NodeRef sourceNode, NodeRef destNode, String path)
      Log the creation of a new node
      Parameters:
      transferId - String
      sourceNode - NodeRef
      destNode - NodeRef
      path - The path of the updated node
    • logDeleted

      void logDeleted(String transferId, NodeRef sourceNode, NodeRef destNode, String path)
      Log the deletion of a node
      Parameters:
      transferId - String
      sourceNode - NodeRef
      destNode - NodeRef
      path - The path of the deleted node
    • logMoved

      void logMoved(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String oldPath, NodeRef newParent, String newPath)
      After the transfer has completed this method reads the log.
      Parameters:
      transferId - String
      sourceNodeRef - NodeRef
      destNodeRef - NodeRef
      oldPath - String
      newParent - NodeRef
      newPath - String
    • updateProgress

      void updateProgress(String transferId, int currPos) throws TransferException
      update the progress of the specified transfer
      Parameters:
      transferId - String
      currPos - int
      Throws:
      TransferException
    • updateProgress

      void updateProgress(String transferId, int currPos, int endPos) throws TransferException
      update the progress of the specified transfer and possibly change the end position.
      Parameters:
      transferId - String
      currPos - int
      endPos - int
      Throws:
      TransferException
    • updateStatus

      void updateStatus(String transferId, TransferProgress.Status status) throws TransferException
      update the startus of the transfer
      Parameters:
      transferId - String
      status - TransferProgress.Status
      Throws:
      TransferException
    • getProgress

      TransferProgress getProgress(String transferId) throws TransferException
      Read the progress of the
      Parameters:
      transferId - String
      Returns:
      the progress of the transfer
      Throws:
      TransferException
    • getLogInputStream

      InputStream getLogInputStream(String transferId) throws TransferException
      Throws:
      TransferException