Issue #3341 - HttpClientProvider changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-02-15 18:31:53 +11:00
parent 149620598d
commit d8b5f0e1b3
1 changed files with 7 additions and 2 deletions

View File

@ -39,10 +39,10 @@ public interface HttpClientProvider
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());
QueuedThreadPool threadPool = new QueuedThreadPool();
@ -50,4 +50,9 @@ public interface HttpClientProvider
client.setExecutor(threadPool);
return client;
}
default HttpClient newHttpClient()
{
return newDefaultHttpClient();
}
}