On Mon, 2007-05-28 at 00:20 +0200, Roland Weber wrote: > Hi Oleg, > > > I also would like to move #getDefaults / #setDefaults methods to an > > optional interface LinkedHttpParams that extends HttpParams and declare > > it framework internal use. > > I like the idea now. It provides an elegant way to disable > linking in HttpRequestExecutor if it's not wanted. Add > #isParameterSetLocally() to the list. AbstractHttpParams > should not implement the optional interface. >
Done. My idea to move all client-side param hierarchy building code back to HttpRequestExecutor led nowhere. There are clearly cases when parameters need to be accessed before the request hits the request executor. On the positive side, though, I realized we could completely remove HttpParams from HttpRequestExecutor thus making it fully state-less. Now, I would like to take the refactoring even one step further step 7) Always warp an instance of HttpParams with a wrapper class whose sole purpose is to implement HttpLinkedParams and maintain a reference to the upper level defaults . Even if the wrapped class implements HttpLinkedParams, its functionality gets effectively disabled. BasicHttpParams no longer needs to implements HttpLinkedParams. This buys us two things. (1) we no longer need to create copies of params in #setParams() methods. We can simply wrap them. (2) More importantly we can make BasicHttpParam non-synchronized per default. HTTP parameters are meant to be write once - read many kind of object. Synchronization on HttpParams just wastes CPU cycles in 99% of cases. Those who for some reason need synchronized HttpParams can simply set thread-safe implementation with #setParams What do you think? Oleg > > cheers, > Roland > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
