forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResizeContainerCmdImpl.java
More file actions
57 lines (44 loc) · 1.34 KB
/
Copy pathResizeContainerCmdImpl.java
File metadata and controls
57 lines (44 loc) · 1.34 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
48
49
50
51
52
53
54
55
56
57
package com.github.dockerjava.core.command;
import com.github.dockerjava.api.command.ResizeContainerCmd;
import com.github.dockerjava.api.exception.NotFoundException;
import static com.google.common.base.Preconditions.checkNotNull;
public class ResizeContainerCmdImpl extends AbstrDockerCmd<ResizeContainerCmd, Void> implements ResizeContainerCmd {
private String containerId;
private Integer height;
private Integer width;
public ResizeContainerCmdImpl(ResizeContainerCmd.Exec exec, String execId) {
super(exec);
withContainerId(execId);
}
@Override
public String getContainerId() {
return containerId;
}
@Override
public Integer getHeight() {
return height;
}
@Override
public Integer getWidth() {
return width;
}
@Override
public ResizeContainerCmd withContainerId(String containerId) {
checkNotNull(containerId, "containerId was not specified");
this.containerId = containerId;
return this;
}
@Override
public ResizeContainerCmd withSize(int height, int width) {
this.height = height;
this.width = width;
return this;
}
/**
* @throws NotFoundException no such exec instance
*/
@Override
public Void exec() throws NotFoundException {
return super.exec();
}
}