hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38279] - define API for http-async
Date Sat, 21 Jan 2006 12:07:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38279>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38279





------- Additional Comments From olegk@apache.org  2006-01-21 13:07 -------
Hi Roland

I could not invest as much time into the review of your code as I wanted to.
These are my initial impressions based on a *very* superficial examination of
your code (therefore everything I am about to say may be wrong):

(1) AsyncHttpProcessor

Do we really need all these fine-grained methods? Can't #finishResponse() be
merged into #obtainResponse() and #prepareRequest() into #transmitRequest()?

Ideally I would prefer *HttpProcessor classes to not expose HttpMutable* objects
to the caller

Do we need this class at all?

(2) SimpleHttpHandle

if (response_object != null) {
  // postprocessing is delegated back to the dispatcher
  ((SimpleHttpDispatcher) http_dispatcher)
    .postprocessResponse(this, response_object);
} 

Having to cast an interface to a concrete class in order to get some work done
is usually a bad sign suggesting that the API is not flexible enough

(3) SimpleHttpDispatcher

Somehow I can't help thinking that functionality of AsyncHttpProcessor actually
belongs to SimpleHttpDispatcher. Consider moving all the code from
AsyncHttpProcessor to SimpleHttpDispatcher.

(4) System.out.println

There should be no calls to System.out.println and Throwable#printStackTrace().
If you can't just rethrow exceptions and/or absolutely have to print traces,
consider using a logging toolkit

(5) Overall it is a good start. The quality of javadocs in your code puts me to
shame. I have been working on HttpCore for almost a year now, however the
quality of its javadocs is nowhere near that of HttpAsync.

Oleg

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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