Hi Chris,

First, the current internal HTTP client in 2.0 isn't optimized to reduce thread 
usage. We are fixing this design issue in 2.1 using non-blocking NIO. For now, 
you can also leverage the Apache HTTP Client extension which is support for the 
Android edition.

Otherwise, you can reuse the same Client instance across several ClientResource 
instances. Just call 
        
        myClientResource.setNext(myClient);

Best regards,
Jerome
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.o​rg
Noelios Technologies ~ http://www.noelios.com



-----Message d'origine-----
De : Chris Davis [mailto:[email protected]] 
Envoyé : mardi 3 août 2010 11:15
À : [email protected]
Objet : RE: Correct way to use android ClientResource

I've traced further into the code and it seems to be the BaseHelper class that 
is creating a controller service and worker service. This happens for each new 
clientresource object. 

I currently have a clientresource object for each of my resources, is this the 
right way to go about it or should I be sharing one clientresource or maybe 
using the lower level client class??

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2642256

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2659763

Reply via email to