public class FileRemoteProgressEvData extends PayloadBack implements java.io.Serializable, Payload
EventWithDst
for FileRemote actions.
Hint: the EventConsumer
evaluating this data repectively for the evBack of file operations should be
an derived instance of FileRemoteProgressEventConsumer
.Modifier and Type | Class and Description |
---|---|
static class |
FileRemoteProgressEvData.Answer
Possible answers from quest.
|
static class |
FileRemoteProgressEvData.ProgressCmd |
Modifier and Type | Field and Description |
---|---|
FileRemoteCmdEventData.Cmd |
answerToCmd
The original command which this is answer to.
|
protected boolean |
bAbort
These are bits for communication from set from the application.
|
protected boolean |
bMkdirAll
These are bits for communication from set from the application.
|
protected boolean |
bOverwrite
These are bits for communication from set from the application.
|
protected boolean |
bOverwriteAll
These are bits for communication from set from the application.
|
boolean |
bPause
True then the application will be stop the execution.
|
boolean |
bQuest
True then the service has stopped execution (thread is in wait) for an answer.
|
FileRemote |
currDir
Current processed file.
|
FileRemote |
currFile
Current processed file.
|
long |
dateCreate |
long |
dateLastAccess |
int |
modeCopyOper
Mode of operation, see
FileRemote.modeCopyCreateAsk etc. |
int |
nrDirProcessed
Number of processed directories and files independent of mark situation,
but don't count directories which are not entered.
|
int |
nrDirVisited
Number of processed directories and files independent of mark situation,
but don't count directories which are not entered.
|
int |
nrFilesVisited
Number of processed directories and files independent of mark situation,
but don't count directories which are not entered.
|
long |
nrofBytesAll
Processed bytes.
|
long |
nrofBytesFile
Processed bytes.
|
long |
nrofBytesFileCopied
Processed bytes.
|
int |
nrofFilesMarked
Number of Files which are marked while walking and processing.
|
int |
nrofFilesSelected
Number of Files which are selected by String mask or marked bits.
|
FileRemoteProgressEvData.ProgressCmd |
progressCmd
Cmd describes what the progress event contains.
|
private static long |
serialVersionUID |
static java.lang.String |
version
Version, license and history.
|
bDone, sError
Constructor and Description |
---|
FileRemoteProgressEvData()
super constructor:
|
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
Quest from executer.
|
boolean |
bOverwriteAll()
Quest from executer.
|
FileRemoteProgressEvData |
clean()
Common operation to clean the content.
|
boolean |
deserialize(byte[] data)
Deserialize is not supported by this implementation.
|
boolean |
done() |
void |
done(FileRemoteCmdEventData.Cmd answer,
java.lang.String sError)
Set the event to the done() state, all is done maybe with error.
|
boolean |
mkdirAll()
Quest from executer.
|
boolean |
overwrite()
Quest from executer.
|
boolean |
pause()
Quest from executer while working.
|
byte[] |
serialize()
Serialize is not supported by this implementation.
|
void |
setAbort()
Set from application to force abort in the executer.
|
void |
setAnswer(FileRemoteProgressEvData.ProgressCmd answer)
This operation should be called by the application if a
#quest() is detected. |
void |
setbOverwriteAll(boolean value)
Set from application to force abort in the executer.
|
void |
setMkdirAll(boolean value)
Set from application to force abort in the executer.
|
void |
setOverwrite(boolean value)
Set from application to force abort in the executer.
|
void |
setPause(boolean value)
Set from application to force abort in the executer working in the current.
|
error, setDone
public static final java.lang.String version
PayloadBack
which contains bDone and sError.
FileRemoteProgressEvData.ProgressCmd
now contains all cmd for ask, yet in progress.
clean()
progressCmd
is of type FileRemoteProgressEvData.ProgressCmd
, separated now from FileRemote.Cmd
done()
in cohesion with org.vishia.event.EventConsumerAwait#awaitExecution(long)
and TimeOrder.repeatCyclic()
. If done()
was called the cyclically repeat ends
because it calls TimeOrder.clear()
.
TimeOrder
also here. Some adpations done.
#isBusy()
private static final long serialVersionUID
public FileRemoteProgressEvData.ProgressCmd progressCmd
public FileRemoteCmdEventData.Cmd answerToCmd
public FileRemote currFile
public FileRemote currDir
public long dateCreate
public long dateLastAccess
public long nrofBytesAll
public long nrofBytesFile
public long nrofBytesFileCopied
public int nrDirVisited
public int nrDirProcessed
public int nrFilesVisited
public int nrofFilesSelected
public int nrofFilesMarked
public int modeCopyOper
FileRemote.modeCopyCreateAsk
etc.public boolean bQuest
public boolean bPause
protected boolean bAbort
protected boolean bOverwrite
protected boolean bOverwriteAll
protected boolean bMkdirAll
public FileRemoteProgressEvData()
name
- Only for toString(), debugmng
- The manager for this time order to execute it for showing, often a graphic thread adaption.
For example use org.vishia.gral.base.GralMng#gralDevice()
and there org.vishia.gral.base.GralGraphicThread#orderList()
.delay
- The delay to start the oder execution after #show()public FileRemoteProgressEvData clean()
Payload
clean
in interface Payload
clean
in class PayloadBack
public void done(FileRemoteCmdEventData.Cmd answer, java.lang.String sError)
infoUnusedFinish
- Either EventConsumer.mEventConsumerException
or EventConsumer.mEventConsumFinished
sError
- a message if any what was unexpected. Especially on unexpected exception.public boolean done()
done
in class PayloadBack
public final void setAnswer(FileRemoteProgressEvData.ProgressCmd answer)
#quest()
is detected.
If the executer waits then it will be notified.answer
- the answer for the quest.public boolean abort()
setAbort()
for example by user handling any time.public void setAbort()
public boolean pause()
setPause(boolean)
is given,
then the thread goes in wait, checks in an interval of 10 seconds whether bPause
is still set,
and continues if bPause
is false again.
Note that setPause(boolean)
with false wakes up waiting.public void setPause(boolean value)
public boolean overwrite()
setAbort()
for example by user handling any time.public void setOverwrite(boolean value)
public boolean bOverwriteAll()
setAbort()
for example by user handling any time.public void setbOverwriteAll(boolean value)
public boolean mkdirAll()
public void setMkdirAll(boolean value)
public byte[] serialize()
PayloadBack
serialize
in interface Payload
serialize
in class PayloadBack
public boolean deserialize(byte[] data)
PayloadBack
deserialize
in interface Payload
deserialize
in class PayloadBack