You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Will McQueen <wi...@yahoo.com> on 2009/06/05 07:32:13 UTC

ThreadSafeClientManager -- where's the default registry?

Hi,

The single constructor for ThreadSafeClientConnManager says this about the schreg (ie, scheme registry) param:
	"the scheme registry, or null for the default registry".
	
Where is the default registry assigned? I would have thought that this constructor would check for a null schreg, and if it is null then it would register 2 schemes with this conn mgr -- one "http" scheme and one "https" scheme, with default ports 80 and 443 respectively, and with socket factories PlainSocketFactory and SSLSocketFactory respectively.

Instead, I see that this constructor just calls createConnectionOperator(schreg) (which also states that it accepts a null schreg), and this method in turn calls the constructor "DefaultClientConnectionOperator(schreg)" which BAMMM... throws an exception when it sees that the param is null.

I probably missed something, as I understand that thousands of people have probably looked at this code and played with it before me. What am I missing?

Thank you.

Cheers,
Will


      

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


Re: ThreadSafeClientManager -- where's the default registry?

Posted by Oleg Kalnichevski <ol...@apache.org>.
Will McQueen wrote:
> Hi,
> 
> The single constructor for ThreadSafeClientConnManager says this about the schreg (ie, scheme registry) param:
> 	"the scheme registry, or null for the default registry".
> 	
> Where is the default registry assigned? I would have thought that this constructor would check for a null schreg, and if it is null then it would register 2 schemes with this conn mgr -- one "http" scheme and one "https" scheme, with default ports 80 and 443 respectively, and with socket factories PlainSocketFactory and SSLSocketFactory respectively.
> 
> Instead, I see that this constructor just calls createConnectionOperator(schreg) (which also states that it accepts a null schreg), and this method in turn calls the constructor "DefaultClientConnectionOperator(schreg)" which BAMMM... throws an exception when it sees that the param is null.
> 
> I probably missed something, as I understand that thousands of people have probably looked at this code and played with it before me. What am I missing?
> 
> Thank you.
> 
> Cheers,
> Will
> 

Hi Will

Javadoc is plain wrong. Corrected in SVN trunk. Thanks for letting me know!

Oleg


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


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