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 "KARR, DAVID (ATTSI)" <dk...@att.com> on 2011/05/20 01:20:38 UTC

How do I reset the scheme registry to the default?

I have a method that configures the scheme registry in a couple of different ways, depending on configuration parameters.  These parameters can be set "live" at run time, after the system starts up.  I'm allowing for the possibility of having to reconfigure the scheme registry.  What I need to determine is how I can set the scheme registry to its defaults, in case none of the configuration flag checks succeed.  I don't see an obvious way to do that.

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


Re: How do I reset the scheme registry to the default?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2011-05-19 at 23:20 +0000, KARR, DAVID (ATTSI) wrote:
> I have a method that configures the scheme registry in a couple of different ways, depending on configuration parameters.  These parameters can be set "live" at run time, after the system starts up.  I'm allowing for the possibility of having to reconfigure the scheme registry.  What I need to determine is how I can set the scheme registry to its defaults, in case none of the configuration flag checks succeed.  I don't see an obvious way to do that.
> 

httpclient.getConnectionManager().getSchemeRegistry().register(
  new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
httpclient.getConnectionManager().getSchemeRegistry().register(
  new Scheme("https", 443, SSLSocketFactory.getSocketFactory()));

Hope this helps

Oleg



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