forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWaitContainerCmdImpl.java
More file actions
36 lines (29 loc) · 896 Bytes
/
Copy pathWaitContainerCmdImpl.java
File metadata and controls
36 lines (29 loc) · 896 Bytes
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
package com.github.dockerjava.core.command;
import com.github.dockerjava.api.command.WaitContainerCmd;
import com.google.common.base.Preconditions;
/**
* Wait a container
*
* Block until container stops, then returns its exit code
*/
public class WaitContainerCmdImpl extends AbstrDockerCmd<WaitContainerCmd, Integer> implements WaitContainerCmd {
private String containerId;
public WaitContainerCmdImpl(WaitContainerCmd.Exec exec, String containerId) {
super(exec);
withContainerId(containerId);
}
@Override
public String getContainerId() {
return containerId;
}
@Override
public WaitContainerCmd withContainerId(String containerId) {
Preconditions.checkNotNull(containerId, "containerId was not specified");
this.containerId = containerId;
return this;
}
@Override
public String toString() {
return "wait " + containerId;
}
}