@ -57,49 +58,98 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
@@ -57,49 +58,98 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
"No CloseableHttpAsyncClient - use getAsyncClient() instead");
return(CloseableHttpAsyncClient)this.asyncClient;
}
@ -109,22 +159,26 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
@@ -109,22 +159,26 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
// Use request configuration given by the user, when available
@ -133,13 +187,14 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
@@ -133,13 +187,14 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
@ -148,7 +203,10 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
@@ -148,7 +203,10 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
@ -71,7 +71,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -71,7 +71,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
*withadefault{@linkHttpClient}.
*/
publicHttpComponentsClientHttpRequestFactory(){
this(HttpClients.createSystem());
this.httpClient=HttpClients.createSystem();
}
/**
@ -80,8 +80,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -80,8 +80,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
Assert.notNull(httpClient,"HttpClient must not be null");
this.httpClient=httpClient;
setHttpClient(httpClient);
}
@ -90,6 +89,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -90,6 +89,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
Assert.notNull(httpClient,"HttpClient must not be null");
this.httpClient=httpClient;
}
@ -97,7 +97,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -97,7 +97,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@ -153,9 +152,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -153,9 +152,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@ -171,7 +167,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -171,7 +167,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@ -179,10 +175,10 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -179,10 +175,10 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@ -301,8 +297,9 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -301,8 +297,9 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
*/
@Override
publicvoiddestroy()throwsException{
if(this.httpClientinstanceofCloseable){
((Closeable)this.httpClient).close();
HttpClienthttpClient=getHttpClient();
if(httpClientinstanceofCloseable){
((Closeable)httpClient).close();
}
}
@ -312,7 +309,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
@@ -312,7 +309,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest