You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Gary Gregory <ga...@gmail.com> on 2018/07/23 18:21:00 UTC
HttpCoreContext v4 vs 5
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
Re: HttpCoreContext v4 vs 5
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2018-07-24 at 14:35 -0600, Gary Gregory wrote:
> On Tue, Jul 24, 2018 at 1:30 AM Oleg Kalnichevski <ol...@apache.org>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: HttpCoreContext v4 vs 5
Posted by Gary Gregory <ga...@gmail.com>.
On Tue, Jul 24, 2018 at 1:30 AM Oleg Kalnichevski <ol...@apache.org> 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?
Gary
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
Re: HttpCoreContext v4 vs 5
Posted by Oleg Kalnichevski <ol...@apache.org>.
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.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org