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
28 lines (20 loc) · 873 Bytes
/
Copy pathAbstrAsyncDockerCmd.java
File metadata and controls
28 lines (20 loc) · 873 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
package com.github.dockerjava.core.command;
import java.util.Objects;
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) {
this.execution = Objects.requireNonNull(execution, "execution was not specified");
}
@Override
public <T extends ResultCallback<A_RES_T>> T exec(T resultCallback) {
execution.exec((CMD_T) this, resultCallback);
return resultCallback;
}
@Override
public void close() {
}
}