forked from mwiede/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSaveImagesCmd.java
More file actions
47 lines (36 loc) · 1.24 KB
/
Copy pathSaveImagesCmd.java
File metadata and controls
47 lines (36 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.github.dockerjava.api.command;
import com.github.dockerjava.api.exception.NotFoundException;
import javax.annotation.Nonnull;
import java.io.InputStream;
import java.util.List;
/** Command for downloading multiple images at once. */
public interface SaveImagesCmd extends SyncDockerCmd<InputStream> {
/** Image name and tag. */
interface TaggedImage {
/**
* The (tagged) image name.
* @return "name:tag" if a tag was specified, otherwise "name"
*/
String asString();
}
/**
* Adds an image to the list of images to download.
* @param name image name (not null)
* @param tag tag
* @return this
*/
SaveImagesCmd withImage(@Nonnull String name, @Nonnull String tag);
/**
* Gets the images that were added by {@link #withImage(String, String)}.
* @return images to be downloaded
*/
List<TaggedImage> getImages();
/**
* Its the responsibility of the caller to consume and/or close the {@link InputStream} to prevent connection leaks.
*
* @throws NotFoundException no such image
*/
InputStream exec() throws NotFoundException;
interface Exec extends DockerCmdSyncExec<SaveImagesCmd, InputStream> {
}
}