singleton httpclient

Brent Putman putmanb at georgetown.edu
Mon Nov 18 16:38:40 EST 2019


On 11/18/19 4:22 PM, Cantor, Scott wrote:
> On 11/18/19, 4:12 PM, "dev on behalf of Jim Fox" <dev-bounces at shibboleth.net on behalf of fox at washington.edu> wrote:
>
>> If there is a PoolingHttpClientConnectionManager somewhere on that plate of spaghetti, how do I control the min
>> and max connection limits?
> If there are settings other than maxConnectionsTotal and maxConnectionsPerRoute they're probably not exposed. The builder is there to make Spring config more friendly but it's got a lot of known gaps. But those two are definitely there.

Right, our client builder seeks to must make it Spring-friendly for the
most common options.

Our builder wraps an instance of the Apache builder.  There's a no-arg
ctor of our builder which gives you a default Apache one, but there's
also one which allows injection of a custom-configured one:

 public HttpClientBuilder(@Nonnull final
org.apache.http.impl.client.HttpClientBuilder builder) { ... }

So using that variant, you could wire up literally anything that is
possible via the Apache builder.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20191118/0f5aba4e/attachment.html>


More information about the dev mailing list