Ok, then my 'getKeepAliveDuration' method should do: 1. If the user enters a 'keepAliveDuration' (> 0) --> return this value. 2. If the user does not check 'keep-alive', then: 2.1. if 'keep-alive' header exists --> return its value. 2.2. if not, return Integer.MAX_VALUE.
Is this right? Thanks, Joan. -----Mensaje original----- De: Oleg Kalnichevski [mailto:[email protected]] Enviado el: viernes, 18 de junio de 2010 13:44 Para: HttpClient User Discussion Asunto: RE: Keep alive questions On Fri, 2010-06-18 at 12:51 +0200, Joan Balaguero wrote: > Hello Oleg, > > Thanks for your response. > > What I mean by removing keep alive strategy is the following. I have an > administration application with the following option: > > [x] Keep alive http connection for [ xxxx ] seconds. > > If the user checks this option, he must enter a number greather than 0 as > keep alive duration. Then I set my own KeepAliveStrategy with: > > this.objHttp.setKeepAliveStrategy(new > VPFWConnectionKeepAliveStrategy(keepAliveDuration)); > > But now imagine that the same user unchecks this option. Then, I should apply > the default keep alive strategy. And what is this? Keep alive indefinitely? > Pass to 'VPFWConnectionKeepAliveStrategy' an Integer.MAX_VALUE value? > Check Keep-Alive header, if not found, keep alive indefinitely. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2944 - Release Date: 06/18/10 08:35:00 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
