java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.base.ProgressCallbackAdapter |
A concurrency-friendly, standard implementation of the progress callback interface. Sub-classes may override the methods they want.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ProgressCallbackAdapter() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final long | getCurrent() | ||||||||||
final long | getTotal() | ||||||||||
long | increment() | ||||||||||
void |
message(int id, String msg)
This method is used by the provider to send a transient message to its client.
| ||||||||||
void |
setCurrent(long current)
This method is called by a provider to update the current computation count.
| ||||||||||
void |
setTotal(long total)
This method called by a provider (generally once) to set an initial (possibly estimate)
computation count.
| ||||||||||
void |
updateTotal(long count)
Set or update the total by the provided unit amount.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.util.base.IProgressCallback
|
This method is used by the provider to send a transient message to its client.
id | message id (0 or 1) |
---|---|
msg | message string |
This method is called by a provider to update the current computation count. Together with the total count, a client may compute an estimated completion ratio.
This method called by a provider (generally once) to set an initial (possibly estimate) computation count. The number in itself is arbitrary.
Set or update the total by the provided unit amount. If the total had
been set
, it is updated; else, it is set.