|
Awake SQL v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.awakefw.commons.api.client.DefaultAwakeProgressManager
public class DefaultAwakeProgressManager
A default implementation for an Awake Progress Manager.
This implementation is ready to use without any customization.
Constructor Summary | |
---|---|
DefaultAwakeProgressManager()
Constructor. |
Method Summary | |
---|---|
void |
cancel()
Cancels the current monitored operation. |
long |
getLengthToTransfer()
Allows to define the total length in bytes of the file(s) to transfer. |
int |
getProgress()
Returns the progress (as percentage) of the current monitored operation. |
boolean |
isCancelled()
Method repeatedly called by Awake when uploading/downloading files. |
void |
setLengthToTransfer(long lengthToTransfer)
Will reinitialize all other values for a new usage: cancelValue = false
progress = 0
|
void |
setProgress(int progress)
Sets the progress in percentage of the transfer operation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAwakeProgressManager()
Method Detail |
---|
public void cancel()
AwakeProgressManager
cancel
in interface AwakeProgressManager
public long getLengthToTransfer()
AwakeProgressManager
getLengthToTransfer
in interface AwakeProgressManager
public int getProgress()
AwakeProgressManager
getProgress
in interface AwakeProgressManager
public boolean isCancelled()
AwakeProgressManager
Returns true if this task was canceled before it completed normally.
isCancelled
in interface AwakeProgressManager
public void setLengthToTransfer(long lengthToTransfer)
cancelValue = false
progress = 0
setLengthToTransfer
in interface AwakeProgressManager
lengthToTransfer
- the total length in bytes of the file(s) to transferpublic void setProgress(int progress)
AwakeProgressManager
The method is repeatedly called by Awake during transfer operation each 1% of transfer done.
setProgress
in interface AwakeProgressManager
progress
- The value must be between 0 and 100
|
Awake SQL v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |