On Wed, 2010-03-24 at 16:02 +0200, Todor Boev wrote: > Hi, > I examined the current nio HTTP client code locate in > > http://svn.apache.org/repos/asf/httpcomponents/asynchttpclient/trunk > > I have some questions. > > 1) The method AsyncHttpClient.execute() returns an instance of > HttpExchange. All I can do with this exchange is block until the > response comes or poll periodically to see if the response has > arrived. Is there a way to be notified in a call-back style instead? >
A callback interface makes sense. We happily take patches ;-) > 2) Is the entire response cached inside the HttpResponse that is > returned from HttpExchange? I need to do the hybrid style nio where I > use blocking stream adapters between a stream-oriented application > code and the nio engine. I.e. in my current nio client code I use the > ThrottlingHttpClientHandler. Is this blocking/non-blocking > interoperability going to be supported somehow? > This will be tricky. Presently I see no way around having to have different implementations for pure the NIO model and the hybrid one. Patches are welcome. > 3) I use daemon threads for the IOReactor because my users are not > used to shutting down their clients. Is there going to be a way to > pass a ThreadFactory to the AsyncHttpClient so I can populate it with > daemon threads? > Patches welcome. Cheers Oleg PS: You will hear this phrase a lot from me these days. > Cheers, > Todor > > -- > Go on! Destroy the fabric of the universe! See if I care! > > --------------------------------------------------------------------- > 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]
