public class FileRemoteWalkerCallbackCopy extends FileRemoteProgressEventConsumer implements FileRemoteWalkerCallback
FileRemote#walkLocal(org.vishia.fileRemote.FileRemoteCmdEventData.Cmd, FileRemote, int, int, String, int, int, FileRemoteWalkerCallback, FileRemoteCmdEventData, int, org.vishia.event.EventWithDst)
An instance of this class is used for callback.
For the copy itself it calls an operations of FileRemoteAccessor to copy on the device.
Either one file is copied, or the directory tree is created which are designated, and then children should be copied.SortedTreeWalkerCallback.Result
Modifier and Type | Field and Description |
---|---|
(package private) FileRemote |
dstDir |
(package private) FileRemote |
dstRootDir |
(package private) FileRemote |
srcRootDir |
nrDirAvail, nrFilesAvail, nrofBytesAllAvail, version
bDone, cmdData, evBack, evThread, name, progressData, sError
callbackTemplate, sVersion
mEventConsumed, mEventConsumerException, mEventConsumFinished, mEventDonotRelinquish, mMaskReservedHere
Constructor and Description |
---|
FileRemoteWalkerCallbackCopy() |
Modifier and Type | Method and Description |
---|---|
void |
cleanSetDstDir(FileRemote dstDir) |
void |
finished(FileRemote startNode)
Invoked after finishing the walking through.
|
SortedTreeWalkerCallback.Result |
finishedParentNode(FileRemote parentNode,
java.lang.Object data,
java.lang.Object oWalkInfo)
Invoked on end of walking through a parent node.
|
SortedTreeWalkerCallback.Result |
offerLeafNode(FileRemote leafNode,
java.lang.Object leafNodeData)
Invoked for any node which has no children or which is not processed because the depth of walking through the tree is reached.
|
SortedTreeWalkerCallback.Result |
offerParentNode(FileRemote parentNode,
java.lang.Object data,
java.lang.Object oWalkInfo)
Invoked on start on walking through a parent node which have children.
|
boolean |
shouldAborted()
Returns true if the tree walking should be terminated respectively aborted.
|
void |
start(FileRemote startNode,
FileRemoteCmdEventData startInfo)
Invoked before start of a walk through the tree.
|
clean, setAvail
awaitExecution, done, evThread, processEvent, processEvent, setDone
FileRemote srcRootDir
FileRemote dstRootDir
FileRemote dstDir
public void cleanSetDstDir(FileRemote dstDir)
public void start(FileRemote startNode, FileRemoteCmdEventData startInfo)
SortedTreeWalkerCallback
start
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
public SortedTreeWalkerCallback.Result offerParentNode(FileRemote parentNode, java.lang.Object data, java.lang.Object oWalkInfo)
SortedTreeWalkerCallback
#offerLeafNode(TypeNode)
is not invoked.offerParentNode
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
data
- Specific data presentation of the nodeoWalkInfo
- internal possible information about walking, depending on usage.public SortedTreeWalkerCallback.Result finishedParentNode(FileRemote parentNode, java.lang.Object data, java.lang.Object oWalkInfo)
SortedTreeWalkerCallback
finishedParentNode
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
parentNode
- the node which was walked throughdata
- Specific data presentation of the nodeoWalkInfo
- internal possible information about walking, depending on usage.public SortedTreeWalkerCallback.Result offerLeafNode(FileRemote leafNode, java.lang.Object leafNodeData)
SortedTreeWalkerCallback
#offerLeafNode(Object)
, only one of both is called for a node.
For example it is invoked for a sub directory only if the depth is reached and #offerParentNode(TypeNode)
is not called.offerLeafNode
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
public void finished(FileRemote startNode)
SortedTreeWalkerCallback
finished
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
public boolean shouldAborted()
SortedTreeWalkerCallback
shouldAborted
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>