I speak only for myself of course, but what you're suggesting would not be my favoured approach. You're suggesting you wrap: HttpClient classes > HttpURLConnection > HessianConnection. I don't see the point in having HttpURLConnection in the mix. It adds an unnecessary level of complexity and it's interface would be restrictive (of course, you could extend it, but then why not use HttpClient directly?).
Anyway, as you noted, if you wanted to proceed with this approach then you could implement it yourself and use it with HessianConnection. Thanks, Sam On 5 September 2011 18:40, Juergen Weber <[email protected]> wrote: > >> HttpClient won't return a java.net.URLConnection instance - that's a >> class from Java's built in (and woefully limited) HTTP client. > > Yes, but HttpURLConnection is abstract, so HttpClient could very well > provide a derived class of HttpURLConnection. > >> However, looking at the Hessian API docs it doesn't appear that you >> need to use java.net.URLConnection anyway. It looks like you need to >> implement >> http://www.caucho.com/resin-4.0-javadoc/com/caucho/hessian/client >> /HessianConnectionFactory.html, >> and this does not prescribe usage of java.net.URLConnection. It does >> mention java.net.URL, but that's as an input and you can use this with >> HttpClient if you wish. > > Yes, you're right, one could implement a HessianConnection based on > HttpClient (and get the In/OutputStreams from HttpMethod), but I think a > derived class of HttpURLConnection would be more generally useful (and also > for the special usecase of HessianConnection) > > Thanks, > Juergen > > -- > View this message in context: > http://old.nabble.com/HttpClient-as-java.net.URLConnection-tp32401921p32402722.html > Sent from the HttpClient-User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]
