Skip to content

Commit 7ff216e

Browse files
author
Marcus Linke
committed
Separate packages for API, Core and Implementation
1 parent 3fbb7b7 commit 7ff216e

File tree

136 files changed

+2706
-1474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2706
-1474
lines changed

src/main/java/com/github/dockerjava/api/DockerClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public interface DockerClient extends Closeable {
4343
*/
4444
public AuthCmd authCmd();
4545

46-
public InfoCmd infoCmd() throws DockerException;
46+
public InfoCmd infoCmd();
4747

4848
public PingCmd pingCmd();
4949

50-
public VersionCmd versionCmd() throws DockerException;
50+
public VersionCmd versionCmd();
5151

5252
/**
5353
* * IMAGE API *

src/main/java/com/github/dockerjava/api/command/AttachContainerCmd.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,8 @@ public interface AttachContainerCmd extends DockerCmd<InputStream>{
5757
*/
5858
@Override
5959
public InputStream exec() throws NotFoundException;
60+
61+
public static interface Exec extends DockerCmdExec<AttachContainerCmd, InputStream> {
62+
}
6063

6164
}

src/main/java/com/github/dockerjava/api/command/AuthCmd.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.dockerjava.api.command;
22

33
import com.github.dockerjava.api.UnauthorizedException;
4+
import com.github.dockerjava.api.model.AuthConfig;
45

56
/**
67
*
@@ -9,7 +10,14 @@
910
*/
1011
public interface AuthCmd extends DockerCmd<Void> {
1112

13+
public AuthConfig getAuthConfig();
14+
15+
public AuthCmd withAuthConfig(AuthConfig authConfig);
16+
1217
@Override
1318
public Void exec() throws UnauthorizedException;
19+
20+
public static interface Exec extends DockerCmdExec<AuthCmd, Void> {
21+
}
1422

1523
}

src/main/java/com/github/dockerjava/api/command/BuildImageCmd.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.github.dockerjava.api.command;
22

3-
import java.io.File;
43
import java.io.InputStream;
54

65
/**
@@ -14,7 +13,7 @@ public interface BuildImageCmd extends DockerCmd<InputStream>{
1413

1514
public BuildImageCmd withTag(String tag);
1615

17-
public File getDockerFolder();
16+
public InputStream getTarInputStream();
1817

1918
public String getTag();
2019

@@ -23,6 +22,8 @@ public interface BuildImageCmd extends DockerCmd<InputStream>{
2322
public boolean hasRemoveEnabled();
2423

2524
public boolean isQuiet();
25+
26+
public BuildImageCmd withTarInputStream(InputStream tarInputStream);
2627

2728
public BuildImageCmd withNoCache();
2829

@@ -31,5 +32,8 @@ public interface BuildImageCmd extends DockerCmd<InputStream>{
3132
public BuildImageCmd withRemove(boolean rm);
3233

3334
public BuildImageCmd withQuiet(boolean quiet);
35+
36+
public static interface Exec extends DockerCmdExec<BuildImageCmd, InputStream> {
37+
}
3438

3539
}

src/main/java/com/github/dockerjava/api/command/CommitCmd.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.github.dockerjava.api.command;
22

3+
import java.io.InputStream;
4+
35
import com.github.dockerjava.api.NotFoundException;
46
import com.github.dockerjava.api.model.ExposedPorts;
57
import com.github.dockerjava.api.model.Volumes;
@@ -107,5 +109,8 @@ public interface CommitCmd extends DockerCmd<String>{
107109
* @throws NotFoundException No such container
108110
*/
109111
public String exec() throws NotFoundException;
112+
113+
public static interface Exec extends DockerCmdExec<CommitCmd, String> {
114+
}
110115

111116
}

src/main/java/com/github/dockerjava/api/command/ContainerDiffCmd.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ public interface ContainerDiffCmd extends DockerCmd<List<ChangeLog>> {
2121
* @throws DockerException unexpected http status code
2222
*/
2323
public List<ChangeLog> exec() throws NotFoundException;
24+
25+
public static interface Exec extends DockerCmdExec<ContainerDiffCmd, List<ChangeLog>> {
26+
}
2427

2528
}

src/main/java/com/github/dockerjava/api/command/CopyFileFromContainerCmd.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ public interface CopyFileFromContainerCmd extends DockerCmd<InputStream> {
2222
* @throws NotFoundException No such container
2323
*/
2424
public InputStream exec() throws NotFoundException;
25+
26+
public static interface Exec extends DockerCmdExec<CopyFileFromContainerCmd, InputStream> {
27+
}
2528

2629
}

src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,8 @@ public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
9898
*/
9999
public CreateContainerResponse exec() throws NotFoundException,
100100
ConflictException;
101+
102+
public static interface Exec extends DockerCmdExec<CreateContainerCmd, CreateContainerResponse> {
103+
}
101104

102105
}

src/main/java/com/github/dockerjava/api/command/CreateImageCmd.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ public interface CreateImageCmd extends DockerCmd<CreateImageResponse> {
77
public String getRepository();
88

99
public String getTag();
10+
11+
public InputStream getImageStream();
1012

1113
/**
1214
* @param repository the repository to import to
@@ -22,6 +24,9 @@ public interface CreateImageCmd extends DockerCmd<CreateImageResponse> {
2224
* @param tag any tag for this image
2325
*/
2426
public CreateImageCmd withTag(String tag);
27+
28+
public static interface Exec extends DockerCmdExec<CreateImageCmd, CreateImageResponse> {
29+
}
2530

2631

2732
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.github.dockerjava.api.command;
2+
3+
public interface DockerCmdExec<CMD_T extends DockerCmd<RES_T>, RES_T> {
4+
5+
public RES_T exec(CMD_T command);
6+
7+
}

0 commit comments

Comments
 (0)