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 void
cancel
(ConditionCode code) return the name of the bucket where the file is being transfered to/from.byte[]
long
return the name of the object (file) which is being transfered.return the remote path of the file which is being transfered.long
return the file size in bytes or -1 if the size is not known.long
protected void
void
processPacket
(CfdpPacket packet) protected void
resume()
protected void
suspend()
Methods inherited from class org.yamcs.cfdp.OngoingCfdpTransfer
abandonTransfer, cancelInactivityTimer, cancellable, cancelTransfer, changeState, failTransfer, getCreationTime, getDestinationId, getFailuredReason, getFaultHandlingAction, getId, getInitiatorId, getStartTime, getTransactionId, getTransferState, getTransferType, getTransferType, isOngoing, isReliable, pausable, pauseTransfer, pushError, rescheduleInactivityTimer, resumeTransfer, sendInfoEvent, sendPacket, sendWarnEvent, toEventMsg
-
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:
processPacket
in classOngoingCfdpTransfer
-
onInactivityTimerExpiration
protected void onInactivityTimerExpiration()- Specified by:
onInactivityTimerExpiration
in classOngoingCfdpTransfer
-
suspend
protected void suspend()- Specified by:
suspend
in classOngoingCfdpTransfer
-
resume
protected void resume()- Specified by:
resume
in classOngoingCfdpTransfer
-
cancel
- Specified by:
cancel
in classOngoingCfdpTransfer
-
getInitiatorEntityId
public long getInitiatorEntityId() -
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.
-
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.
-
getOriginalObjectName
-
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.
-
getDirection
-
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.
-
getTransferredSize
public long getTransferredSize() -
getDirectoryListingResponse
-
getFileData
public byte[] getFileData() -
getOriginatingTransactionId
-