hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: MultiThreadedHttpConnectionManager
Date Sun, 15 Apr 2007 18:55:27 GMT
Hello Mike,

> However I'd like to have one particular connection to be
> 'reserved' and have priority over all other connections when required. 
> 
> Is there a way I can use the
> HttpConnection object with HttpClient.executeMethod for that specific
> connection?

None that I know of. Allthough your idea makes sense from a general
point of view, I doubt it will work with the specifics of the rather
special, and occasionally screwed, HttpClient 3.x API.

If in your place, I would create two HttpClient objects with separate
connection managers. One with many connections for the regular stuff,
and another one with a single connection for the prioritized stuff.
You can use HttpClient.setState() to assign the same default state
to both HttpClient objects. Use MTHCM for both, even though one of
them has only a single connection to manage. MTHCM is thread safe,
while SimpleHttpConnectionManager is not.

hope that helps,
  Roland



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


Mime
View raw message