@@ -40,22 +40,10 @@ public class DockerClientConfig implements Serializable {
4040
4141 private static final String DOCKER_IO_SERVER_ADDRESS_PROPERTY = "docker.io.serverAddress" ;
4242
43- private static final String DOCKER_IO_READ_TIMEOUT_PROPERTY = "docker.io.readTimeout" ;
44-
45- // this is really confusing, as there are two ways to spell it
46- private static final String DOCKER_IO_ENABLE_LOGGING_FILTER_PROPERTY = "docker.io.enableLoggingFilter" ;
47-
48- private static final String DOCKER_IO_FOLLOW_REDIRECTS_FILTER_PROPERTY = "docker.io.followRedirectsFilter" ;
49-
5043 private static final String DOCKER_IO_DOCKER_CERT_PATH_PROPERTY = "docker.io.dockerCertPath" ;
5144
5245 private static final String DOCKER_IO_DOCKER_CFG_PATH_PROPERTY = "docker.io.dockerCfgPath" ;
5346
54- // connection pooling properties
55- private static final String DOCKER_IO_MAX_PER_ROUTE_PROPERTY = "docker.io.perRouteConnections" ;
56-
57- private static final String DOCKER_IO_MAX_TOTAL_PROPERTY = "docker.io.totalConnections" ;
58-
5947 /**
6048 * A map from the environment name to the interval name.
6149 */
@@ -69,9 +57,6 @@ public class DockerClientConfig implements Serializable {
6957 m .put ("DOCKER_PASSWORD" , DOCKER_IO_PASSWORD_PROPERTY );
7058 m .put ("DOCKER_EMAIL" , DOCKER_IO_EMAIL_PROPERTY );
7159 m .put ("DOCKER_SERVER_ADDRESS" , DOCKER_IO_SERVER_ADDRESS_PROPERTY );
72- m .put ("DOCKER_READ_TIMEOUT" , DOCKER_IO_READ_TIMEOUT_PROPERTY );
73- m .put ("DOCKER_LOGGING_FILTER_ENABLED" , DOCKER_IO_ENABLE_LOGGING_FILTER_PROPERTY );
74- m .put ("DOCKER_FOLLOW_REDIRECTS_FILTER_ENABLED" , DOCKER_IO_FOLLOW_REDIRECTS_FILTER_PROPERTY );
7560 m .put (DOCKER_CERT_PATH_PROPERTY , DOCKER_IO_DOCKER_CERT_PATH_PROPERTY );
7661 m .put ("DOCKER_CFG_PATH" , DOCKER_IO_DOCKER_CFG_PATH_PROPERTY );
7762 ENV_NAME_TO_IO_NAME = Collections .unmodifiableMap (m );
@@ -83,34 +68,18 @@ public class DockerClientConfig implements Serializable {
8368
8469 private final String version , username , password , email , serverAddress , dockerCfgPath ;
8570
86- private final Integer readTimeout ;
87-
88- private final boolean loggingFilterEnabled ;
89-
90- private final boolean followRedirectsFilterEnabled ;
91-
9271 private final SSLConfig sslConfig ;
9372
94- private final Integer maxTotalConnections ;
95-
96- private final Integer maxPerRouteConnections ;
97-
9873 DockerClientConfig (URI uri , String version , String username , String password , String email , String serverAddress ,
99- String dockerCfgPath , Integer readTimeout , boolean loggingFilterEnabled ,
100- boolean followRedirectsFilterEnabled , SSLConfig sslConfig , Integer maxTotalConns , Integer maxPerRouteConns ) {
74+ String dockerCfgPath , SSLConfig sslConfig ) {
10175 this .uri = uri ;
10276 this .version = version ;
10377 this .username = username ;
10478 this .password = password ;
10579 this .email = email ;
10680 this .serverAddress = serverAddress ;
10781 this .dockerCfgPath = dockerCfgPath ;
108- this .readTimeout = readTimeout ;
109- this .loggingFilterEnabled = loggingFilterEnabled ;
110- this .followRedirectsFilterEnabled = followRedirectsFilterEnabled ;
11182 this .sslConfig = sslConfig ;
112- this .maxTotalConnections = maxTotalConns ;
113- this .maxPerRouteConnections = maxPerRouteConns ;
11483 }
11584
11685 private static Properties loadIncludedDockerProperties (Properties systemProperties ) {
@@ -208,8 +177,7 @@ private static Properties overrideDockerPropertiesWithSystemProperties(Propertie
208177
209178 for (String key : new String [] { DOCKER_IO_URL_PROPERTY , DOCKER_IO_VERSION_PROPERTY ,
210179 DOCKER_IO_USERNAME_PROPERTY , DOCKER_IO_PASSWORD_PROPERTY , DOCKER_IO_EMAIL_PROPERTY ,
211- DOCKER_IO_SERVER_ADDRESS_PROPERTY , DOCKER_IO_READ_TIMEOUT_PROPERTY ,
212- DOCKER_IO_ENABLE_LOGGING_FILTER_PROPERTY , DOCKER_IO_FOLLOW_REDIRECTS_FILTER_PROPERTY ,
180+ DOCKER_IO_SERVER_ADDRESS_PROPERTY ,
213181 DOCKER_IO_DOCKER_CERT_PATH_PROPERTY , DOCKER_IO_DOCKER_CFG_PATH_PROPERTY , }) {
214182 if (systemProperties .containsKey (key )) {
215183 overriddenProperties .setProperty (key , systemProperties .getProperty (key ));
@@ -261,18 +229,6 @@ public String getServerAddress() {
261229 return serverAddress ;
262230 }
263231
264- public Integer getReadTimeout () {
265- return readTimeout ;
266- }
267-
268- public boolean isLoggingFilterEnabled () {
269- return loggingFilterEnabled ;
270- }
271-
272- public boolean followRedirectsFilterEnabled () {
273- return followRedirectsFilterEnabled ;
274- }
275-
276232 public SSLConfig getSslConfig () {
277233 return sslConfig ;
278234 }
@@ -281,14 +237,6 @@ public String getDockerCfgPath() {
281237 return dockerCfgPath ;
282238 }
283239
284- public Integer getMaxTotalConnections () {
285- return maxTotalConnections ;
286- }
287-
288- public Integer getMaxPerRoutConnections () {
289- return maxPerRouteConnections ;
290- }
291-
292240 private AuthConfig getAuthConfig () {
293241 AuthConfig authConfig = null ;
294242 if (getUsername () != null && getPassword () != null && getEmail () != null && getServerAddress () != null ) {
@@ -352,8 +300,6 @@ public boolean equals(Object o) {
352300
353301 DockerClientConfig that = (DockerClientConfig ) o ;
354302
355- if (loggingFilterEnabled != that .loggingFilterEnabled )
356- return false ;
357303 if (sslConfig != null ? !sslConfig .equals (that .sslConfig ) : that .sslConfig != null )
358304 return false ;
359305 if (dockerCfgPath != null ? !dockerCfgPath .equals (that .dockerCfgPath ) : that .dockerCfgPath != null )
@@ -362,8 +308,6 @@ public boolean equals(Object o) {
362308 return false ;
363309 if (password != null ? !password .equals (that .password ) : that .password != null )
364310 return false ;
365- if (readTimeout != null ? !readTimeout .equals (that .readTimeout ) : that .readTimeout != null )
366- return false ;
367311 if (serverAddress != null ? !serverAddress .equals (that .serverAddress ) : that .serverAddress != null )
368312 return false ;
369313 if (uri != null ? !uri .equals (that .uri ) : that .uri != null )
@@ -386,8 +330,6 @@ public int hashCode() {
386330 result = 31 * result + (serverAddress != null ? serverAddress .hashCode () : 0 );
387331 result = 31 * result + (dockerCfgPath != null ? dockerCfgPath .hashCode () : 0 );
388332 result = 31 * result + (sslConfig != null ? sslConfig .hashCode () : 0 );
389- result = 31 * result + (readTimeout != null ? readTimeout .hashCode () : 0 );
390- result = 31 * result + (loggingFilterEnabled ? 1 : 0 );
391333 return result ;
392334 }
393335
@@ -396,19 +338,14 @@ public String toString() {
396338 return "DockerClientConfig{" + "uri=" + uri + ", version='" + version + '\'' + ", username='" + username + '\''
397339 + ", password='" + password + '\'' + ", email='" + email + '\'' + ", serverAddress='" + serverAddress
398340 + '\'' + ", dockerCfgPath='" + dockerCfgPath + '\'' + ", sslConfig='" + sslConfig + '\''
399- + ", readTimeout=" + readTimeout + ", loggingFilterEnabled=" + loggingFilterEnabled
400- + ", followRedirectsFilterEnabled=" + followRedirectsFilterEnabled + '}' ;
341+ + '}' ;
401342 }
402343
403344 public static class DockerClientConfigBuilder {
404345 private URI uri ;
405346
406347 private String version , username , password , email , serverAddress , dockerCfgPath ;
407348
408- private Integer readTimeout , maxTotalConnections , maxPerRouteConnections ;
409-
410- private boolean loggingFilterEnabled , followRedirectsFilterEnabled ;
411-
412349 private SSLConfig sslConfig ;
413350
414351 /**
@@ -424,21 +361,8 @@ public DockerClientConfigBuilder withProperties(Properties p) {
424361 .withPassword (p .getProperty (DOCKER_IO_PASSWORD_PROPERTY ))
425362 .withEmail (p .getProperty (DOCKER_IO_EMAIL_PROPERTY ))
426363 .withServerAddress (p .getProperty (DOCKER_IO_SERVER_ADDRESS_PROPERTY ))
427- .withReadTimeout (Integer .valueOf (p .getProperty (DOCKER_IO_READ_TIMEOUT_PROPERTY , "0" )))
428- .withLoggingFilter (Boolean .valueOf (p .getProperty (DOCKER_IO_ENABLE_LOGGING_FILTER_PROPERTY , "true" )))
429- .withFollowRedirectsFilter (
430- Boolean .valueOf (p .getProperty (DOCKER_IO_FOLLOW_REDIRECTS_FILTER_PROPERTY , "false" )))
431364 .withDockerCertPath (p .getProperty (DOCKER_IO_DOCKER_CERT_PATH_PROPERTY ))
432- .withDockerCfgPath (p .getProperty (DOCKER_IO_DOCKER_CFG_PATH_PROPERTY ))
433- .withMaxPerRouteConnections (integerValue (p .getProperty (DOCKER_IO_MAX_PER_ROUTE_PROPERTY )))
434- .withMaxTotalConnections (integerValue (p .getProperty (DOCKER_IO_MAX_TOTAL_PROPERTY )));
435- }
436-
437- private Integer integerValue (String value ) {
438- if (value != null )
439- return Integer .valueOf (value );
440- else
441- return null ;
365+ .withDockerCfgPath (p .getProperty (DOCKER_IO_DOCKER_CFG_PATH_PROPERTY ));
442366 }
443367
444368 public final DockerClientConfigBuilder withUri (String uri ) {
@@ -472,31 +396,6 @@ public DockerClientConfigBuilder withServerAddress(String serverAddress) {
472396 return this ;
473397 }
474398
475- public final DockerClientConfigBuilder withReadTimeout (Integer readTimeout ) {
476- this .readTimeout = readTimeout ;
477- return this ;
478- }
479-
480- public final DockerClientConfigBuilder withMaxTotalConnections (Integer maxTotalConnections ) {
481- this .maxTotalConnections = maxTotalConnections ;
482- return this ;
483- }
484-
485- public final DockerClientConfigBuilder withMaxPerRouteConnections (Integer maxPerRouteConnections ) {
486- this .maxPerRouteConnections = maxPerRouteConnections ;
487- return this ;
488- }
489-
490- public final DockerClientConfigBuilder withLoggingFilter (boolean loggingFilterEnabled ) {
491- this .loggingFilterEnabled = loggingFilterEnabled ;
492- return this ;
493- }
494-
495- public final DockerClientConfigBuilder withFollowRedirectsFilter (boolean followRedirectsFilterEnabled ) {
496- this .followRedirectsFilterEnabled = followRedirectsFilterEnabled ;
497- return this ;
498- }
499-
500399 public final DockerClientConfigBuilder withDockerCertPath (String dockerCertPath ) {
501400 if (dockerCertPath != null ) {
502401 this .sslConfig = new LocalDirectorySSLConfig (dockerCertPath );
@@ -516,8 +415,7 @@ public final DockerClientConfigBuilder withSSLConfig(SSLConfig config) {
516415
517416 public DockerClientConfig build () {
518417 return new DockerClientConfig (uri , version , username , password , email , serverAddress , dockerCfgPath ,
519- readTimeout , loggingFilterEnabled , followRedirectsFilterEnabled , sslConfig , maxTotalConnections ,
520- maxPerRouteConnections );
418+ sslConfig );
521419 }
522420 }
523421
0 commit comments