hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: [PATCH] HttpClient/HttpMultiClient merge
Date Mon, 02 Dec 2002 04:57:01 GMT
Hello all.  Sorry I haven't responded in a while.  I'll have time 
tomorrow to make the suggested changes and will post a new patch.

Mike

On Thursday, November 28, 2002, at 03:42 PM, Oleg Kalnichevski wrote:

> Oops. My hands seem to be shaky. Sorry about my previous post
>
> Ortwin,
> I have already proposed similar kind of protocol registry a while ago. 
> I
> have already whipped up a few classes. If you decide to do it yourself,
> I think it should also include a default port and a socket factory. I 
> do
> agree that Mike's design would look even cooler if we did away with 
> that
> awkward isSecure flag in HttpClient and HttpConnection methods and all
> ugly code around it
>
> Cheers
>
> Oleg
>
>
>
> On Thu, 2002-11-28 at 20:45, Ortwin Gl├╝ck wrote:
>> I finally reviewed your patch: Woah, GREAT WORK!
>>
>> Architecture looks clean. Tests run smoothly (except of 4 offline 
>> tests,
>> but this could be a config or a temporary problem).
>>
>> There are a number of FIXME's. But this could easily cleaned up after
>> the commit.
>>
>> I have some further enhancements but they do not block a commit:
>>
>> - in MultiThreadedHttpConnectionManager (what a class name!), have you
>> considered using a WeakHashMap instead of building this whole weak ref
>> stuff yourself? This JDK 1.2 compatible. I did not look at the details
>> so maybe it is not possible.
>>
>> - There are a lot of 'if (protocol.equalsIgnoreCase("HTTP")' 
>> statements.
>> We could make a Protocol class like:
>>
>> public class Protocol {
>>    private static Map protocols = new HashMap();
>>    private String name;
>>    private boolean secure;
>>
>>    static {
>>       protocols.put("HTTP", new Protocol("http", false));
>>       protocols.put("HTTPS", new Protocol("https", true));
>>    }
>>
>>    private Protocol(String name, boolean secure) {
>>      this.name = name;
>>      this.secure = secure;
>>    }
>>
>>    public static Protocol getProtocol(String name) {
>>      return (Protocol) protocols.get(name);
>>    }
>> }
>>
>>
>> In my opinion we can commit this.
>>
>> (A patch that works with the current CVS HEAD would be nice...)
>>
>>
>> Odi
>>
>>
>> --
>> To unsubscribe, e-mail:   
>> <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <mailto:commons-httpclient-dev-help@jakarta.apache.org>
> -- 
> Oleg Kalnichevski <o.kalnichevski@dplanet.ch>
>
>
> --
> To unsubscribe, e-mail:   
> <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-httpclient-dev-help@jakarta.apache.org>
>


Mime
View raw message