public interface

IProgressCallback

com.pnfsoftware.jeb.util.base.IProgressCallback
Known Indirect Subclasses

Class Overview

Progress callback interface, used by various types to provide progress information about an on-going task. Methods involving lengthy operations (referred to as 'provider') sometimes accept such objects and use them to provide progress information to the caller (referred to as 'client').

Summary

Public Methods
abstract long getCurrent()
abstract long getTotal()
abstract long increment()
abstract boolean isInitialized()
Determine whether this object is initialized.
abstract void message(String msg)
This method is used by the provider to send a transient message to its client, with id 0.
abstract void message(int id, String msg)
This method is used by the provider to send a transient message to its client.
abstract void setCurrent(long current)
This method is called by a provider to update the current computation count.
abstract void setTotal(long total)
This method called by a provider (generally once) to set an initial (possibly estimate) computation count.
abstract void updateTotal(long count)
Set or update the total by the provided unit amount.

Public Methods

public abstract long getCurrent ()

public abstract long getTotal ()

public abstract long increment ()

Returns
  • the incremented value

public abstract boolean isInitialized ()

Determine whether this object is initialized.

public abstract void message (String msg)

This method is used by the provider to send a transient message to its client, with id 0. It is the same as message(0, msg).

public abstract 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 abstract 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 abstract 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 abstract 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.