forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstrAsyncDockerCmd.java
More file actions
29 lines (21 loc) · 921 Bytes
/
Copy pathAbstrAsyncDockerCmd.java
File metadata and controls
29 lines (21 loc) · 921 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
package com.github.dockerjava.core.command;
import static com.google.common.base.Preconditions.checkNotNull;
import com.github.dockerjava.api.async.ResultCallback;
import com.github.dockerjava.api.command.AsyncDockerCmd;
import com.github.dockerjava.api.command.DockerCmdAsyncExec;
public abstract class AbstrAsyncDockerCmd<CMD_T extends AsyncDockerCmd<CMD_T, A_RES_T>, A_RES_T> implements
AsyncDockerCmd<CMD_T, A_RES_T> {
protected transient DockerCmdAsyncExec<CMD_T, A_RES_T> execution;
public AbstrAsyncDockerCmd(DockerCmdAsyncExec<CMD_T, A_RES_T> execution) {
checkNotNull(execution, "execution was not specified");
this.execution = execution;
}
@Override
public <T extends ResultCallback<A_RES_T>> T exec(T resultCallback) {
execution.exec((CMD_T) this, resultCallback);
return resultCallback;
}
@Override
public void close() {
}
}