hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject [HttpConn] Scheme
Date Sun, 28 Jan 2007 09:30:24 GMT
Hi all,

I'm planning to make some changes to the Scheme class.
In HttpClient I need to decide whether a route requires
tunnelling, which depends on the socket factory for the
target host scheme, that's why I want to change it now.
There are two things I don't like:

1. The static map of registered schemes. Let's replace
   it with a new SchemeSet class that can be instantiated
   dynamically. A static default SchemeSet can still be
   kept for fallbacks.

2. A scheme ID is not required to match the name:

     Scheme s = new Scheme("http",...,80);
     Scheme.registerScheme("http", s);
     Scheme.registerScheme("https", s);

     String id = "https";
     if (!Scheme.getScheme(id).getName().equals(id))
        System.out.println("I am confused");

   I'd give the new SchemeSet class a register(Scheme)
   method that uses the scheme name as identifier.



To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org

View raw message