|
Awake SQL v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AwakeProgressManager
Interface that defines methods to monitor in Swing the upload & download of files.
An implemented instance must be passed to the AwakeFileSession
instance using the setAwakeProgressManager
method.
It is then possible to use your own methods to follow the progress or to
cancel the task.
See DefaultAwakeProgressManager
for a default and basic
implementation that should suit (almost) all your needs.
See the source code of AwakeFileProgressMonitorDemo.java
that demonstrates the use of an AwakeProgressManager
to upload
files on a remote Awake Server.
DefaultAwakeProgressManager
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)
Sets the total length of files in bytes to transfer. |
void |
setProgress(int progress)
Sets the progress in percentage of the transfer operation. |
Method Detail |
---|
void cancel()
long getLengthToTransfer()
int getProgress()
boolean isCancelled()
Returns true if this task was canceled before it completed normally.
void setLengthToTransfer(long lengthToTransfer)
lengthToTransfer
- the total length in bytes of the file(s) to transfervoid setProgress(int progress)
The method is repeatedly called by Awake during transfer operation each 1% of transfer done.
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 |