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
- Author:
- Phillip Webb, Scott Frederick
-
Field Summary
Fields inherited from interface org.springframework.boot.buildpack.platform.docker.UpdateListener
NONE
-
Constructor Summary
ModifierConstructorDescriptionprotected
TotalProgressListener
(Consumer<TotalProgressEvent> consumer, String[] trackedStatusKeys) Create a newTotalProgressListener
that sendsevents
to the given consumer. -
Method Summary
-
Constructor Details
-
TotalProgressListener
Create a newTotalProgressListener
that sendsevents
to the given consumer.- Parameters:
consumer
- the consumer that receivesprogress events
trackedStatusKeys
- a list of status event keys to track the progress of
-
-
Method Details
-
onStart
public void onStart()Description copied from interface:UpdateListener
Called when the operation starts.- Specified by:
onStart
in interfaceUpdateListener<E extends ImageProgressUpdateEvent>
-
onUpdate
Description copied from interface:UpdateListener
Called when an update event is available.- Specified by:
onUpdate
in interfaceUpdateListener<E extends ImageProgressUpdateEvent>
- Parameters:
event
- the update event
-
onFinish
public void onFinish()Description copied from interface:UpdateListener
Called when the operation finishes (with or without error).- Specified by:
onFinish
in interfaceUpdateListener<E extends ImageProgressUpdateEvent>
-