forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExecStartCmdImpl.java
More file actions
85 lines (68 loc) · 1.91 KB
/
Copy pathExecStartCmdImpl.java
File metadata and controls
85 lines (68 loc) · 1.91 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.github.dockerjava.core.command;
import java.io.InputStream;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.dockerjava.api.async.ResultCallback;
import com.github.dockerjava.api.command.ExecStartCmd;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.Frame;
public class ExecStartCmdImpl extends AbstrAsyncDockerCmd<ExecStartCmd, Frame> implements ExecStartCmd {
@JsonIgnore
private String execId;
@JsonProperty("Detach")
private Boolean detach;
@JsonProperty("Tty")
private Boolean tty;
@JsonIgnore
private InputStream stdin;
public ExecStartCmdImpl(ExecStartCmd.Exec exec, String execId) {
super(exec);
withExecId(execId);
}
@Override
public String getExecId() {
return execId;
}
@Override
public ExecStartCmd withExecId(String execId) {
this.execId = Objects.requireNonNull(execId, "execId was not specified");
return this;
}
@Override
public Boolean hasDetachEnabled() {
return detach;
}
@Override
public Boolean hasTtyEnabled() {
return tty;
}
@Override
@JsonIgnore
public InputStream getStdin() {
return stdin;
}
@Override
public ExecStartCmd withDetach(Boolean detach) {
this.detach = detach;
return this;
}
@Override
public ExecStartCmd withTty(Boolean tty) {
this.tty = tty;
return this;
}
@Override
public ExecStartCmd withStdIn(InputStream stdin) {
this.stdin = stdin;
return this;
}
/**
* @throws NotFoundException
* No such exec instance
*/
@Override
public <T extends ResultCallback<Frame>> T exec(T resultCallback) {
return super.exec(resultCallback);
}
}