Hi Oleg, A pull request is made as per the suggestion. https://github.com/apache/httpcore/pull/6
Thanks Malaka On Mon, Nov 10, 2014 at 7:08 PM, Oleg Kalnichevski <[email protected]> wrote: > On Mon, 2014-11-10 at 17:33 +0530, Malaka Gallage wrote: > > Hello everyone, > > > > I'm using NIO version 4.2.5 and I'm facing a little problem. I have some > > operations to be executed on HttpAsyncRequestExecutor#connected and I > have > > implemented those operations now. But the problem occurs when I use > > keepalive connections. I want these operations to be executed on reusing > an > > established connection from the pool too. > > > > To achieve this, I have added a callback method called > onReusingPoolEntry() > > to AbstractNIOConnPool which is executed when reusing an established > > connection from the pool. > > > > Code : > > > > private boolean processPendingRequest(final LeaseRequest<T, C, E> > request) { > > .................. > > ........ > > if (entry != null) { > > this.available.remove(entry); > > this.leased.add(entry); > > future.completed(entry); > > onReusingPoolEntry(entry); > > return true; > > } > > ......... > > ................. > > } > > > > protected void onReusingPoolEntry(E entry) {} > > > > > I suggest to add this feature to the NIO code base too. WDYT? > > > > Thanks > > Malaka > > > > Sounds reasonable enough. Feel free to raise a PR at GitHub for this > change. Please note that you should be working with the 4.4.x branch, > which is to become the official stable branch soon. > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Regards, *Malaka GallageSoftware Engineer* *AdroitLogic Lanka (Pvt) Ltd.* [image: Facebook] <https://www.facebook.com/malaka.gallage> [image: Twitter] <http://twitter.com/#%21/MalakaGallage> [image: LinkedIn] <http://www.linkedin.com/profile/view?id=91872322&trk=tab_pro> [image: Blogger] <http://swordofpoet.blogspot.com/> Skype : malaka.gallage Mobile : +94 718 796 378
