Package org.yamcs.cfdp
Class OngoingCfdpTransfer
java.lang.Object
org.yamcs.cfdp.OngoingCfdpTransfer
- All Implemented Interfaces:
CfdpFileTransfer,FileTransfer
- Direct Known Subclasses:
CfdpIncomingTransfer,CfdpOutgoingTransfer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.yamcs.cfdp.CfdpFileTransfer
CfdpFileTransfer.PredefinedTransferTypes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final CfdpTransactionIdprotected final longprotected final EventProducerprotected final ScheduledThreadPoolExecutorprotected ScheduledFuture<?>protected final Logprotected final longprotected TransferStateprotected Stringprotected 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(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 TransferStateprotected static StringgetTransferType(MetadataPacket metadata) Sets the transfer type fom the metadata packetfinal 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.cfdp.CfdpFileTransfer
getLocalEntityId, getRemoteEntityIdMethods inherited from interface org.yamcs.filetransfer.FileTransfer
getBucketName, getDirection, getObjectName, getRemotePath, getTotalSize, getTransferredSize
-
Field Details
-
cfdpTransactionId
-
state
-
executor
-
eventProducer
-
acknowledged
protected boolean acknowledged -
log
-
startTime
protected final long startTime -
wallclockStartTime
protected final long wallclockStartTime -
creationTime
protected final long creationTime -
transferType
-
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
-
getTransferType
Sets the transfer type fom the metadata packet- Parameters:
metadata- Metadata packet
-
processPacket
-
pushError
-
sendPacket
-
isOngoing
public final boolean isOngoing() -
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
-
isReliable
public boolean isReliable()- Specified by:
isReliablein interfaceFileTransfer
-
getStartTime
public long getStartTime()- Specified by:
getStartTimein interfaceFileTransfer
-
failTransfer
-
changeState
-
getFailuredReason
- Specified by:
getFailuredReasonin interfaceFileTransfer
-
getId
public long getId()- Specified by:
getIdin interfaceFileTransfer
-
getFaultHandlingAction
protected org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction getFaultHandlingAction(ConditionCode code) -
getInitiatorEntityId
public long getInitiatorEntityId()Return the entity id of the Sender- Specified by:
getInitiatorEntityIdin interfaceCfdpFileTransfer
-
getDestinationId
public long getDestinationId()Return the entity id of the Receiver- Specified by:
getDestinationIdin interfaceCfdpFileTransfer
-
getTransferType
- Specified by:
getTransferTypein interfaceFileTransfer
-
sendInfoEvent
-
sendWarnEvent
-
toEventMsg
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTimein interfaceFileTransfer
-