On Tue, 2018-07-24 at 14:35 -0600, Gary Gregory wrote: > On Tue, Jul 24, 2018 at 1:30 AM Oleg Kalnichevski <[email protected]> > wrote: > > > On Mon, 2018-07-23 at 12:21 -0600, Gary Gregory wrote: > > > Hi All: > > > > > > In version 4 in HttpCoreContext I could get to the > > > HttpConnection, > > > but no > > > longer in version 5. > > > > > > Can we add that back? > > > > > > Gary > > > > I would personally prefer not to, given it is applicable to the > > classic > > i/o only. HttpCoreContext now exposes EndpointDetails and > > SSLSession > > attributes instead which as far as I know are the main reasons for > > needing access to the underlying connection objects. > > > > After my port so far, I am using EndpointDetails and SSLSession, the > one > item I am missing which was previously available was querying the > socket > timeout (getSocketTimeout()). > > How about adding that instead of the whole connection? In > EndpointDetails? >
One of the reasons, probably the main reason, why shoving connection objects into HttpContext is not desirable is difference in their life cycle. HTTP connections are resource and memory footprint heavy and should get GC-ed as soon as possible. HttpContext instances, on the other hand, should be light and can be used for a long sequence of message exchanges. I am fine with adding more stuff to EndpointDetail as long as it does not drag the entire HTTP connection object with it. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
