public class TotalProgressPullListener extends java.lang.Object implements UpdateListener<PullImageUpdateEvent>
UpdateListener that calculates the total progress of the entire pull operation
and publishes TotalProgressEvent.NONE| Constructor and Description |
|---|
TotalProgressPullListener(java.util.function.Consumer<TotalProgressEvent> consumer)
Create a new
TotalProgressPullListener that sends events to the given consumer. |
TotalProgressPullListener(java.lang.String prefix)
Create a new
TotalProgressPullListener that prints a progress bar to
System.out. |
| 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(PullImageUpdateEvent event)
Called when an update event is available.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnonepublic TotalProgressPullListener(java.lang.String prefix)
TotalProgressPullListener that prints a progress bar to
System.out.prefix - the prefix to outputpublic TotalProgressPullListener(java.util.function.Consumer<TotalProgressEvent> consumer)
TotalProgressPullListener that sends events to the given consumer.consumer - the consumer that receives progress
eventspublic void onStart()
UpdateListeneronStart in interface UpdateListener<PullImageUpdateEvent>public void onUpdate(PullImageUpdateEvent event)
UpdateListeneronUpdate in interface UpdateListener<PullImageUpdateEvent>event - the update eventpublic void onFinish()
UpdateListeneronFinish in interface UpdateListener<PullImageUpdateEvent>