Class TotalProgressListener<E extends ImageProgressUpdateEvent>
java.lang.Object
org.springframework.boot.buildpack.platform.docker.TotalProgressListener<E>
- Type Parameters:
E- the type ofImageProgressUpdateEvent
- All Implemented Interfaces:
UpdateListener<E>
- Direct Known Subclasses:
TotalProgressPullListener,TotalProgressPushListener
public abstract class TotalProgressListener<E extends ImageProgressUpdateEvent>
extends Object
implements UpdateListener<E>
UpdateListener that calculates the total progress of the entire image operation
and publishes TotalProgressEvent.- Since:
- 2.4.0
-
Field Summary
Fields inherited from interface org.springframework.boot.buildpack.platform.docker.UpdateListener
NONE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTotalProgressListener(Consumer<TotalProgressEvent> consumer, String[] trackedStatusKeys) Create a newTotalProgressListenerthat sendseventsto the given consumer. -
Method Summary
-
Constructor Details
-
TotalProgressListener
Create a newTotalProgressListenerthat sendseventsto the given consumer.- Parameters:
consumer- the consumer that receivesprogress eventstrackedStatusKeys- a list of status event keys to track the progress of
-
-
Method Details
-
onStart
public void onStart()Description copied from interface:UpdateListenerCalled when the operation starts.- Specified by:
onStartin interfaceUpdateListener<E extends ImageProgressUpdateEvent>
-
onUpdate
Description copied from interface:UpdateListenerCalled when an update event is available.- Specified by:
onUpdatein interfaceUpdateListener<E extends ImageProgressUpdateEvent>- Parameters:
event- the update event
-
onFinish
public void onFinish()Description copied from interface:UpdateListenerCalled when the operation finishes (with or without error).- Specified by:
onFinishin interfaceUpdateListener<E extends ImageProgressUpdateEvent>
-