public class

ProgressCallbackAdapter

extends Object
implements IProgressCallback
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.base.ProgressCallbackAdapter

Class Overview

A concurrency-friendly, standard implementation of the progress callback interface. Sub-classes may override the methods they want.

Summary

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

Public Constructors

public ProgressCallbackAdapter ()

Public Methods

public final long getCurrent ()

public final long getTotal ()

public long increment ()

public void message (int id, String msg)

This method is used by the provider to send a transient message to its client.

Parameters
id message id (0 or 1)
msg message string

public void setCurrent (long current)

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.

public void setTotal (long total)

This method called by a provider (generally once) to set an initial (possibly estimate) computation count. The number in itself is arbitrary.

public void updateTotal (long count)

Set or update the total by the provided unit amount. If the total had been set, it is updated; else, it is set.