private static class DefaultDockerClient.LoadProgressHandler extends Object implements ProgressHandler
ProgressHandler is meant to capture the image ID of an
image being loaded. Weirdly enough, Docker returns the ID of a newly created image
in the status of a progress message.
The image ID is required to tag the just loaded image since, also weirdly enough,
the pull operation with the fromSrc parameter does not support the
tag parameter. By retrieving the ID, the image can be tagged with its
image name, given its ID.
| Modifier and Type | Field and Description |
|---|---|
private ProgressHandler |
delegate |
private static int |
EXPECTED_CHARACTER_NUM |
private String |
imageId |
| Modifier | Constructor and Description |
|---|---|
private |
LoadProgressHandler(ProgressHandler delegate) |
| Modifier and Type | Method and Description |
|---|---|
private String |
getImageId() |
void |
progress(ProgressMessage message)
This method will be called for each progress message received from Docker.
|
private static final int EXPECTED_CHARACTER_NUM
private final ProgressHandler delegate
private String imageId
private LoadProgressHandler(ProgressHandler delegate)
private String getImageId()
public void progress(ProgressMessage message) throws DockerException
ProgressHandlerprogress in interface ProgressHandlermessage - the message to processDockerException - if a server error occurred (500)Copyright © 2015. All rights reserved.