@@ -66,19 +66,13 @@ public class DockerClient {
6666 private WebResource baseResource ;
6767 private AuthConfig authConfig ;
6868
69+
6970 public DockerClient () throws DockerException {
70- this (10000 , true );
71- }
72- public DockerClient (Integer readTimeout , boolean enableLoggingFilter ) throws DockerException {
73- this (Config .createConfig (), readTimeout , enableLoggingFilter );
71+ this (Config .createConfig ());
7472 }
7573
7674 public DockerClient (String serverUrl ) throws DockerException {
77- this (serverUrl , 10000 , true );
78- }
79-
80- public DockerClient (String serverUrl , Integer readTimeout , boolean enableLoggingFilter ) throws DockerException {
81- this (configWithServerUrl (serverUrl ), readTimeout , enableLoggingFilter );
75+ this (configWithServerUrl (serverUrl ));
8276 }
8377
8478 private static Config configWithServerUrl (String serverUrl )
@@ -88,7 +82,7 @@ private static Config configWithServerUrl(String serverUrl)
8882 return c ;
8983 }
9084
91- public DockerClient (Config config , Integer readTimeout , boolean enableLoggingFilter ) {
85+ public DockerClient (Config config ) {
9286 ClientConfig clientConfig = new DefaultClientConfig ();
9387
9488 SchemeRegistry schemeRegistry = new SchemeRegistry ();
@@ -109,11 +103,11 @@ public DockerClient(Config config, Integer readTimeout, boolean enableLoggingFil
109103 null , false ), clientConfig );
110104
111105 // 1 hour
112- client .setReadTimeout (readTimeout );
106+ client .setReadTimeout (config . readTimeout );
113107
114108 client .addFilter (new JsonClientFilter ());
115109
116- if (enableLoggingFilter )
110+ if (config . enableLoggingFilter )
117111 client .addFilter (new SelectiveLoggingFilter ());
118112
119113 baseResource = client .resource (config .url + "/v" + config .version );
0 commit comments