hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasile Alin <alinachegal...@gmail.com>
Subject Re: What is the preferred way to override host name resolution in HC 4.1?
Date Fri, 14 Oct 2011 18:21:15 GMT
Alternatively you can inspire from the code available in 4.2:





On 14 October 2011 20:43, Vasile Alin <alinachegalati@gmail.com> wrote:
> On 14 October 2011 18:58, Matt Solnit <msolnit@soasta.com> wrote:
>> Hi everyone.  In HC 4.0, the way that a host name is converted to an InetAddress
object could be overridden by passing a custom HostNameResolver implementation to the socket
factory.  It looks like in HC 4.1, this is deprecated.  What is the preferred way of customizing
host name resolution?
>> I took a look at the source code, and I am guessing I will need to override DefaultClientConnectionOperator.resolveHostName().
 But I want to be sure this is the best way.
> For HC 4.1 I would say the same, this looks the only way to do it.
> Will be hard to use your implementation because you must extend also
> SingleClientConnManager in order to inject it.
> In HC 4.2 this will be much simpler, but this version is not GA yet.
>> -- Matt

To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message