hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject HttpCore & connections
Date Tue, 19 Sep 2006 14:12:56 GMT
Hi Oleg,

I've had some time to relax and think about connections.
As a result, I would like to sum up what I think you are
trying to achieve. Please have a look through it and
correct me where I got you wrong...

In HttpClient, the Connection class directly implemented
all the functionality that was needed. In HttpCore, the
HttpClientConnection interface started out in a similar
fashion, providing basically all the methods we expected
an application or any component to be interested in.
If I got your intentions right this time, you are trying
to change that. Instead of a full-blown abstraction for
client connections, you want HttpCore to define a kind of
adapter interface, which holds only those methods that
are required within HttpCore. Defining a full-blown
abstraction is left to HttpConn.

The responsibility for opening a connection should be moved
outside of HttpCore. Hence, the interface does not need to
specify an open(...) method. HttpCore does not care where
the connection points to, hence the interface does not need
a getTargetHost() method. SocketFactory is only needed to
open a connection, hence it is not needed in HttpCore.

Have you considered ConnectionReuseStrategy? If opening
connections is not the responsibility of HttpCore, then
deciding on reuse vs. opening a new one shouldn't be either.

cheers,
  Roland

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