Use new JettyClientHttpConnector constructor
Simplify `ClientHttpConnectorConfiguration`by using the recently introduced `JettyClientHttpConnector` constructor. See gh-17015
This commit is contained in:
committed by
Phillip Webb
parent
898a903d2f
commit
4ac1407af1
@@ -78,10 +78,7 @@ class ClientHttpConnectorConfiguration {
|
|||||||
JettyResourceFactory jettyResourceFactory) {
|
JettyResourceFactory jettyResourceFactory) {
|
||||||
SslContextFactory sslContextFactory = new SslContextFactory.Client();
|
SslContextFactory sslContextFactory = new SslContextFactory.Client();
|
||||||
HttpClient httpClient = new HttpClient(sslContextFactory);
|
HttpClient httpClient = new HttpClient(sslContextFactory);
|
||||||
httpClient.setExecutor(jettyResourceFactory.getExecutor());
|
return new JettyClientHttpConnector(httpClient, jettyResourceFactory);
|
||||||
httpClient.setByteBufferPool(jettyResourceFactory.getByteBufferPool());
|
|
||||||
httpClient.setScheduler(jettyResourceFactory.getScheduler());
|
|
||||||
return new JettyClientHttpConnector(httpClient);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user