Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 94833 invoked from network); 6 Apr 2010 12:33:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 12:33:12 -0000 Received: (qmail 68475 invoked by uid 500); 6 Apr 2010 12:33:12 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 68433 invoked by uid 500); 6 Apr 2010 12:33:11 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 68425 invoked by uid 99); 6 Apr 2010 12:33:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 12:33:11 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [92.42.190.144] (HELO ok2cons2.nine.ch) (92.42.190.144) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 12:33:02 +0000 Received: from [192.168.100.100] (unknown [213.55.131.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ok2cons2.nine.ch (Postfix) with ESMTPSA id 7953C4BA2A7 for ; Tue, 6 Apr 2010 14:32:41 +0200 (CEST) Subject: Re: Closing the persisted server connections on IOReactor pause From: Oleg Kalnichevski To: HttpComponents Project In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Tue, 06 Apr 2010 14:32:33 +0200 Message-ID: <1270557153.22212.8.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 2010-04-06 at 12:59 +0530, Ruwan Linton wrote: > Hi Devs, > > We (Synapse) has a requirement to close the persisted connections > (keep-alive) when the IOReactor is being paused, and I have looked at the > code and tried to get hold of all the persisted connections that are being > used at the time of the IOReactor pause, without any success :-( > > 1) Is it possible to do this? Yes, it is. > 2) If so, can you please point me to a code snippet or class or a method to > have a look at in getting all the keep-alive connections? > You should be using #connected and #disconnected methods of NHttpClientHandler / NHttpServerHandler interfaces to keep track of open HTTP connections. Hope this helps Oleg > Thanks, > Ruwan > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org