forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTopContainerCmdImpl.java
More file actions
56 lines (45 loc) · 1.42 KB
/
Copy pathTopContainerCmdImpl.java
File metadata and controls
56 lines (45 loc) · 1.42 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
package com.github.dockerjava.core.command;
import static com.google.common.base.Preconditions.checkNotNull;
import com.github.dockerjava.api.command.TopContainerCmd;
import com.github.dockerjava.api.command.TopContainerResponse;
import com.github.dockerjava.api.exception.NotFoundException;
/**
* List processes running inside a container
*/
public class TopContainerCmdImpl extends AbstrDockerCmd<TopContainerCmd, TopContainerResponse> implements
TopContainerCmd {
private String containerId;
private String psArgs;
public TopContainerCmdImpl(TopContainerCmd.Exec exec, String containerId) {
super(exec);
withContainerId(containerId);
}
@Override
public String getContainerId() {
return containerId;
}
@Override
public String getPsArgs() {
return psArgs;
}
@Override
public TopContainerCmd withContainerId(String containerId) {
checkNotNull(containerId, "containerId was not specified");
this.containerId = containerId;
return this;
}
@Override
public TopContainerCmd withPsArgs(String psArgs) {
checkNotNull(psArgs, "psArgs was not specified");
this.psArgs = psArgs;
return this;
}
/**
* @throws NotFoundException
* No such container
*/
@Override
public TopContainerResponse exec() throws NotFoundException {
return super.exec();
}
}