Package org.yamcs.cfdp
Class CfdpIncomingTransfer
java.lang.Object
org.yamcs.cfdp.OngoingCfdpTransfer
org.yamcs.cfdp.CfdpIncomingTransfer
- All Implemented Interfaces:
CfdpFileTransfer,FileTransfer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.yamcs.cfdp.CfdpFileTransfer
CfdpFileTransfer.PredefinedTransferTypes -
Field Summary
Fields inherited from class org.yamcs.cfdp.OngoingCfdpTransfer
acknowledged, cfdpTransactionId, creationTime, eventProducer, executor, inactivityFuture, log, startTime, state, transferType, wallclockStartTime -
Constructor Summary
ConstructorsConstructorDescriptionCfdpIncomingTransfer(String yamcsInstance, long id, long creationTime, ScheduledThreadPoolExecutor executor, YConfiguration config, CfdpHeader hdr, Stream cfdpOut, FileSaveHandler fileSaveHandler, EventProducer eventProducer, TransferMonitor monitor, Map<ConditionCode, org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction> faultHandlerActions) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancel(ConditionCode code) return the name of the bucket where the file is being transfered to/from.byte[]longReturn the entity id of the Senderreturn the name of the object (file) which is being transfered.return the remote path of the file which is being transfered.longreturn the file size in bytes or -1 if the size is not known.longprotected voidvoidprocessPacket(CfdpPacket packet) protected voidresume()protected voidsuspend()Methods inherited from class org.yamcs.cfdp.OngoingCfdpTransfer
abandonTransfer, cancelInactivityTimer, cancellable, cancelTransfer, changeState, failTransfer, getCreationTime, getDestinationId, getFailuredReason, getFaultHandlingAction, getId, getStartTime, getTransactionId, getTransferState, getTransferType, getTransferType, isOngoing, isReliable, pausable, pauseTransfer, pushError, rescheduleInactivityTimer, resumeTransfer, sendInfoEvent, sendPacket, sendWarnEvent, toEventMsgMethods 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, getRemoteEntityId
-
Constructor Details
-
CfdpIncomingTransfer
public CfdpIncomingTransfer(String yamcsInstance, long id, long creationTime, ScheduledThreadPoolExecutor executor, YConfiguration config, CfdpHeader hdr, Stream cfdpOut, FileSaveHandler fileSaveHandler, EventProducer eventProducer, TransferMonitor monitor, Map<ConditionCode, org.yamcs.cfdp.OngoingCfdpTransfer.FaultHandlingAction> faultHandlerActions)
-
-
Method Details
-
processPacket
- Specified by:
processPacketin classOngoingCfdpTransfer
-
onInactivityTimerExpiration
protected void onInactivityTimerExpiration()- Specified by:
onInactivityTimerExpirationin classOngoingCfdpTransfer
-
suspend
protected void suspend()- Specified by:
suspendin classOngoingCfdpTransfer
-
resume
protected void resume()- Specified by:
resumein classOngoingCfdpTransfer
-
cancel
- Specified by:
cancelin classOngoingCfdpTransfer
-
getInitiatorEntityId
public long getInitiatorEntityId()Description copied from class:OngoingCfdpTransferReturn the entity id of the Sender- Specified by:
getInitiatorEntityIdin interfaceCfdpFileTransfer- Overrides:
getInitiatorEntityIdin classOngoingCfdpTransfer
-
getBucketName
Description copied from interface:FileTransferreturn 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.
-
getObjectName
Description copied from interface:FileTransferreturn 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.
-
getOriginalObjectName
-
getRemotePath
Description copied from interface:FileTransferreturn 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.
-
getDirection
-
getTotalSize
public long getTotalSize()Description copied from interface:FileTransferreturn 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.
-
getTransferredSize
public long getTransferredSize() -
getDirectoryListingResponse
-
getFileData
public byte[] getFileData() -
getOriginatingTransactionId
-