E - the type of ImageProgressUpdateEventpublic abstract class TotalProgressListener<E extends ImageProgressUpdateEvent> extends java.lang.Object implements UpdateListener<E>
UpdateListener that calculates the total progress of the entire image operation
and publishes TotalProgressEvent.NONE| Modifier | Constructor and Description |
|---|---|
protected |
TotalProgressListener(java.util.function.Consumer<TotalProgressEvent> consumer,
java.lang.String[] trackedStatusKeys)
Create a new
TotalProgressListener that sends events to the given consumer. |
| Modifier and Type | Method and Description |
|---|---|
void |
onFinish()
Called when the operation finishes (with or without error).
|
void |
onStart()
Called when the operation starts.
|
void |
onUpdate(E event)
Called when an update event is available.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnoneprotected TotalProgressListener(java.util.function.Consumer<TotalProgressEvent> consumer, java.lang.String[] trackedStatusKeys)
TotalProgressListener that sends events to the given consumer.consumer - the consumer that receives progress
eventstrackedStatusKeys - a list of status event keys to track the progress ofpublic void onStart()
UpdateListeneronStart in interface UpdateListener<E extends ImageProgressUpdateEvent>public void onUpdate(E event)
UpdateListeneronUpdate in interface UpdateListener<E extends ImageProgressUpdateEvent>event - the update eventpublic void onFinish()
UpdateListeneronFinish in interface UpdateListener<E extends ImageProgressUpdateEvent>