Class OngoingCfdpTransfer

All Implemented Interfaces:
CfdpFileTransfer, FileTransfer
Direct Known Subclasses:
CfdpIncomingTransfer, CfdpOutgoingTransfer

public abstract class OngoingCfdpTransfer extends Object implements CfdpFileTransfer
  • Field Details

    • cfdpTransactionId

      protected final CfdpTransactionId cfdpTransactionId
    • state

      protected TransferState state
    • executor

      protected final ScheduledThreadPoolExecutor executor
    • eventProducer

      protected final EventProducer eventProducer
    • acknowledged

      protected boolean acknowledged
    • log

      protected final Log log
    • startTime

      protected final long startTime
    • wallclockStartTime

      protected final long wallclockStartTime
    • creationTime

      protected final long creationTime
    • transferType

      protected String transferType
    • inactivityFuture

      protected ScheduledFuture<?> inactivityFuture
  • Constructor Details

  • Method Details

    • getTransferType

      protected static String getTransferType(MetadataPacket metadata)
      Sets the transfer type fom the metadata packet
      metadata - Metadata packet
    • processPacket

      public abstract void processPacket(CfdpPacket packet)
    • pushError

      protected void pushError(String err)
    • sendPacket

      protected void sendPacket(CfdpPacket packet)
    • isOngoing

      public final boolean isOngoing()
    • getTransferState

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

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

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

      protected abstract void onInactivityTimerExpiration()
    • cancelInactivityTimer

      protected void cancelInactivityTimer()
    • rescheduleInactivityTimer

      protected void rescheduleInactivityTimer()
    • pauseTransfer

      public OngoingCfdpTransfer pauseTransfer()
    • suspend

      protected abstract void suspend()
    • resumeTransfer

      public OngoingCfdpTransfer resumeTransfer()
    • resume

      protected abstract void resume()
    • cancelTransfer

      public OngoingCfdpTransfer cancelTransfer()
    • cancel

      protected abstract void cancel(ConditionCode code)
    • abandonTransfer

      public OngoingCfdpTransfer abandonTransfer(String reason)
    • 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
    • isReliable

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

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

      protected void failTransfer(String failureReason)
    • changeState

      protected void changeState(TransferState newState)
    • getFailuredReason

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

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

      protected org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction getFaultHandlingAction(ConditionCode code)
    • getInitiatorId

      public long getInitiatorId()
      Return the entity id of the Sender
    • getDestinationId

      public long getDestinationId()
      Return the entity id of the Receiver
      Specified by:
      getDestinationId in interface CfdpFileTransfer
    • getTransferType

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

      protected void sendInfoEvent(String type, String msg)
    • sendWarnEvent

      protected void sendWarnEvent(String type, String msg)
    • toEventMsg

      protected String toEventMsg(MetadataPacket packet)
    • getCreationTime

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