Issue #3341 - HttpClientProvider changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
149620598d
commit
d8b5f0e1b3
|
@ -39,10 +39,10 @@ public interface HttpClientProvider
|
||||||
Log.getLogger(HttpClientProvider.class).ignore(ignore);
|
Log.getLogger(HttpClientProvider.class).ignore(ignore);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new HttpClientProvider(){}.newHttpClient();
|
return HttpClientProvider.newDefaultHttpClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
default HttpClient newHttpClient()
|
private static HttpClient newDefaultHttpClient()
|
||||||
{
|
{
|
||||||
HttpClient client = new HttpClient(new SslContextFactory());
|
HttpClient client = new HttpClient(new SslContextFactory());
|
||||||
QueuedThreadPool threadPool = new QueuedThreadPool();
|
QueuedThreadPool threadPool = new QueuedThreadPool();
|
||||||
|
@ -50,4 +50,9 @@ public interface HttpClientProvider
|
||||||
client.setExecutor(threadPool);
|
client.setExecutor(threadPool);
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default HttpClient newHttpClient()
|
||||||
|
{
|
||||||
|
return newDefaultHttpClient();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue