OnNext indicates that you handle single elements and not a list
@@ -66,15 +66,16 @@ class DockerListImages extends AbstractDockerRemoteApiTask {
def images = listImagesCmd.exec()
if (nextHandler) {
- nextHandler.execute(images)
+ for(image in images) {
+ nextHandler.execute(image)
+ }
}
}
private void defaultResponseHandling() {
- Action<List> action = new Action<List>() {
+ Action<Object> action = new Action<Object>() {
@Override
- void execute(List images) {
- for(image in images) {
+ void execute(Object image) {
logger.quiet "Repository Tags : ${image.repoTags?.join(', ')}"
logger.quiet "Image ID : $image.id"
logger.quiet "Created : ${new Date(image.created * 1000)}"
@@ -82,7 +83,6 @@ class DockerListImages extends AbstractDockerRemoteApiTask {
logger.quiet "-----------------------------------------------"
}
}
- }
nextHandler = action
}
