java.lang.Object
org.yamcs.cfdp.OngoingCfdpTransfer
- All Implemented Interfaces:
CfdpFileTransfer,FileTransfer
- Direct Known Subclasses:
CfdpIncomingTransfer,CfdpOutgoingTransfer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final CfdpTransactionIdprotected final longprotected final EventProducerprotected final ScheduledThreadPoolExecutorprotected ScheduledFuture<?>protected final Logprotected final longprotected org.yamcs.protobuf.TransferStateprotected final long -
Constructor Summary
ConstructorsConstructorDescriptionOngoingCfdpTransfer(String yamcsInstance, long id, long creationTime, ScheduledThreadPoolExecutor executor, YConfiguration config, CfdpTransactionId cfdpTransactionId, long destinationId, Stream cfdpOut, EventProducer eventProducer, TransferMonitor monitor, Map<ConditionCode, org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction> faultHandlerActions) -
Method Summary
Modifier and TypeMethodDescriptionabandonTransfer(String reason) protected abstract voidcancel(ConditionCode code) protected voidbooleanprotected voidchangeState(org.yamcs.protobuf.TransferState newState) protected voidfailTransfer(String failureReason) longlongReturn the entity id of the Receiverprotected org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingActionlonggetId()longReturn the entity id of the SenderlongGet the CFDP transaction id.final org.yamcs.protobuf.TransferStatefinal booleanbooleanprotected abstract voidbooleanpausable()abstract voidprocessPacket(CfdpPacket packet) protected voidprotected voidprotected abstract voidresume()protected voidsendInfoEvent(String type, String msg) protected voidsendPacket(CfdpPacket packet) protected voidsendWarnEvent(String type, String msg) protected abstract voidsuspend()protected StringtoEventMsg(MetadataPacket packet) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.yamcs.filetransfer.FileTransfer
getBucketName, getDirection, getObjectName, getRemotePath, getTotalSize, getTransferredSize
-
Field Details
-
cfdpTransactionId
-
state
protected org.yamcs.protobuf.TransferState state -
executor
-
eventProducer
-
acknowledged
protected boolean acknowledged -
log
-
startTime
protected final long startTime -
wallclockStartTime
protected final long wallclockStartTime -
creationTime
protected final long creationTime -
inactivityFuture
-
-
Constructor Details
-
OngoingCfdpTransfer
public OngoingCfdpTransfer(String yamcsInstance, long id, long creationTime, ScheduledThreadPoolExecutor executor, YConfiguration config, CfdpTransactionId cfdpTransactionId, long destinationId, Stream cfdpOut, EventProducer eventProducer, TransferMonitor monitor, Map<ConditionCode, org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction> faultHandlerActions)
-
-
Method Details
-
processPacket
-
pushError
-
sendPacket
-
isOngoing
public final boolean isOngoing() -
getTransferState
public final org.yamcs.protobuf.TransferState getTransferState()- Specified by:
getTransferStatein interfaceFileTransfer
-
cancellable
public boolean cancellable()- Specified by:
cancellablein interfaceFileTransfer
-
pausable
public boolean pausable()- Specified by:
pausablein interfaceFileTransfer
-
onInactivityTimerExpiration
protected abstract void onInactivityTimerExpiration() -
cancelInactivityTimer
protected void cancelInactivityTimer() -
rescheduleInactivityTimer
protected void rescheduleInactivityTimer() -
pauseTransfer
-
suspend
protected abstract void suspend() -
resumeTransfer
-
resume
protected abstract void resume() -
cancelTransfer
-
cancel
-
abandonTransfer
-
getTransactionId
Description copied from interface:CfdpFileTransferGet the CFDP transaction id. Returns null for queued transfers.- Specified by:
getTransactionIdin interfaceCfdpFileTransfer- Returns:
-
isReliable
public boolean isReliable()- Specified by:
isReliablein interfaceFileTransfer
-
getStartTime
public long getStartTime()- Specified by:
getStartTimein interfaceFileTransfer
-
failTransfer
-
changeState
protected void changeState(org.yamcs.protobuf.TransferState newState) -
getFailuredReason
- Specified by:
getFailuredReasonin interfaceFileTransfer
-
getId
public long getId()- Specified by:
getIdin interfaceFileTransfer
-
getFaultHandlingAction
protected org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction getFaultHandlingAction(ConditionCode code) -
getSourceId
public long getSourceId()Return the entity id of the Sender- Specified by:
getSourceIdin interfaceCfdpFileTransfer- Returns:
-
getDestinationId
public long getDestinationId()Return the entity id of the Receiver- Specified by:
getDestinationIdin interfaceCfdpFileTransfer- Returns:
-
sendInfoEvent
-
sendWarnEvent
-
toEventMsg
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTimein interfaceFileTransfer
-