hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject [HttpComponents] HttpCookie API redesign
Date Thu, 29 Jun 2006 21:24:00 GMT
Folks,

I have completed the initial rewrite of the cookie management code.
Please review the changes and let me know if you find something
disagreeable.

Here's a short summary of the most important points about the new API

* Unlike HttpCore the new HttpCookie API represents an evolutionary
continuation of the HttpClient 3.1 API. I mostly ended up removing
ill-conceived API shortcuts that have been introduced in the course of
the 3.x development to address some immediate problems and ugly
left-overs from the 1.x and 2.x days. I also reused the best ideas
introduced during the work on the RFC2965 spec. However, conceptually
the cookie management API is still very much the same and is based on
the same principles. Anyone who is familiar with the HttpClient 3.x
cookie management API should be able to pick up the new one relatively
easy. Essentially it is the same API only done right.  

* CookieSpecs are now stateful and are instantiated using an object
factory

* We were initially planning to make Cookie an interface. I am no longer
sure this makes sense. The Cookie class does not have any processing
logic left in it and now is merely a value object. There seems nothing
to be gained from making Cookie abstract. Please let me know if you
agree.

* HttpCookie requires Java 1.3 and HttpCore only. It has no dependency
on any code in HttpClient outside org.apache.http.cookie package.

* HttpCookie code has a very high test coverage (98-100%). I succeeded
in reusing almost all existing test cases from HttpClient 3.x branch.

Anyways, this is just he very first iteration. Please do take a critical
look at what is already there and feel free to suggest improvements.

https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/cookie/

Cheers

Oleg


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


Mime
View raw message