forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPauseContainerCmdImpl.java
More file actions
43 lines (35 loc) · 1.04 KB
/
Copy pathPauseContainerCmdImpl.java
File metadata and controls
43 lines (35 loc) · 1.04 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
package com.github.dockerjava.core.command;
import java.util.Objects;
import com.github.dockerjava.api.command.PauseContainerCmd;
import com.github.dockerjava.api.exception.NotFoundException;
/**
* Pause a container.
*
* @param containerId
* - Id of the container
*
*/
public class PauseContainerCmdImpl extends AbstrDockerCmd<PauseContainerCmd, Void> implements PauseContainerCmd {
private String containerId;
public PauseContainerCmdImpl(PauseContainerCmd.Exec exec, String containerId) {
super(exec);
withContainerId(containerId);
}
@Override
public String getContainerId() {
return containerId;
}
@Override
public PauseContainerCmd withContainerId(String containerId) {
this.containerId = Objects.requireNonNull(containerId, "containerId was not specified");
return this;
}
/**
* @throws NotFoundException
* No such container
*/
@Override
public Void exec() throws NotFoundException {
return super.exec();
}
}