Hiranya Jayathilaka wrote:
Hi Devs,
I would like to know what is the KeepAlive handling strategy used in HTTP
Core 4.1-alpha1. How does HTTP Core deal with KeepAlive connections at
server side and the client side? Is there a way to configure this behavior?
The article at [1] mentions about a class/interface called
ConnectionKeepAliveStrategy. Does the latest 4.1-alpha1 contain this
feature?
Your response is most appreciated.
Thanks,
Hiranya
[1] - http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html
Hiranya,
HttpCore components keep connections alive indefinitely both on the
client and the server side. ConnectionKeepAliveStrategy interface is
provided by HttpClient only and is a client specific extension. It is
not available in the core components. If you want to enforce a
keep-alive limit of some kind you have to build this kind of logic into
the protocol handlers used by your application.
I suppose your are only interested in the NIO side of things. There is
an effort to provide a full fledged asynchronous HTTP client based on
HttpCore NIO, similar to what HttpClient is for HttpCore classic, but it
is presently in a VERY, VERY, VERY early development stage:
http://svn.apache.org/repos/asf/httpcomponents/asynchttpclient/trunk/
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]