Class CompletedTransfer

java.lang.Object
org.yamcs.cfdp.CompletedTransfer
All Implemented Interfaces:
CfdpFileTransfer, FileTransfer

public class CompletedTransfer extends Object implements CfdpFileTransfer
Represents a past CfdpFileTransfer obtained from the database. Reads all the properties from a tuple (row in the database).

Implements also some methods for converting between on-going transfers and tuples.

  • Field Details

  • Constructor Details

    • CompletedTransfer

      public CompletedTransfer(Tuple tuple)
  • Method Details

    • getStartTime

      public long getStartTime()
      Specified by:
      getStartTime in interface FileTransfer
    • getId

      public long getId()
      Specified by:
      getId in interface FileTransfer
    • getObjectName

      public String getObjectName()
      Description copied from interface: FileTransfer
      return the name of the object (file) which is being transfered. This is the filename on the local (Yamcs) site.

      Can be null for incoming transfers - for example CFDP can start a transfer without knowing the filename if the first metadata packet has been lost.

      Specified by:
      getObjectName in interface FileTransfer
    • getRemotePath

      public String getRemotePath()
      Description copied from interface: FileTransfer
      return the remote path of the file which is being transfered.

      Can be null for incoming transfers - for example CFDP can start a transfer without having this information if the first metadata packet has been lost.

      Specified by:
      getRemotePath in interface FileTransfer
    • getDirection

      public TransferDirection getDirection()
      Specified by:
      getDirection in interface FileTransfer
    • getTotalSize

      public long getTotalSize()
      Description copied from interface: FileTransfer
      return the file size in bytes or -1 if the size is not known.

      For the CFDP service the incoming files can be unbounded (but this is not yet supported) or the size will be part of the metadata packet which may be missing.

      Specified by:
      getTotalSize in interface FileTransfer
    • getTransferredSize

      public long getTransferredSize()
      Specified by:
      getTransferredSize in interface FileTransfer
    • getBucketName

      public String getBucketName()
      Description copied from interface: FileTransfer
      return the name of the bucket where the file is being transfered to/from.

      Could be null for incoming transfers. For the CFDP service, the bucket is determined by the source or destination entity id and it is not null. However if the bucket was determined by the filename which is known only when the metadata packet is received, this could be null.

      Specified by:
      getBucketName in interface FileTransfer
    • getTransactionId

      public CfdpTransactionId getTransactionId()
      Description copied from interface: CfdpFileTransfer
      Get the CFDP transaction id. Returns null for queued transfers.
      Specified by:
      getTransactionId in interface CfdpFileTransfer
    • getTransferState

      public TransferState getTransferState()
      Specified by:
      getTransferState in interface FileTransfer
    • isReliable

      public boolean isReliable()
      Specified by:
      isReliable in interface FileTransfer
    • getFailuredReason

      public String getFailuredReason()
      Specified by:
      getFailuredReason in interface FileTransfer
    • pausable

      public boolean pausable()
      Specified by:
      pausable in interface FileTransfer
    • cancellable

      public boolean cancellable()
      Specified by:
      cancellable in interface FileTransfer
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getInitiatorEntityId

      public long getInitiatorEntityId()
      Specified by:
      getInitiatorEntityId in interface CfdpFileTransfer
    • getDestinationId

      public long getDestinationId()
      Specified by:
      getDestinationId in interface CfdpFileTransfer
    • getCreationTime

      public long getCreationTime()
      Specified by:
      getCreationTime in interface FileTransfer
    • getTransferType

      public String getTransferType()
      Specified by:
      getTransferType in interface FileTransfer