You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by khiem nguyen <kh...@googlemail.com> on 2011/01/28 00:05:11 UTC
multi-user/settings with httpclient
hi,
i want to use http-client to implement a kind of proxy-server, since it'll
be used by several users & each user can have different settings
(cookie-handling, headers-handling...), is there a better way than to give
each user 1 or more instances of httpclient which hold user-specific params
& 1 connection-manager for all these client instances ?
thanx for your help
khiemu
Re: multi-user/settings with httpclient
Posted by khiem nguyen <kh...@googlemail.com>.
great, that's clear now
thanx alot oleg.
On Fri, Jan 28, 2011 at 4:11 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Fri, 2011-01-28 at 14:43 +0100, khiem nguyen wrote:
> > what about Interceptors (request & response) ?
> > from my understanding, these are "properties" of HttpClient.
> >
>
> No, they are not. Protocol interceptors are strategies that implement a
> particular aspect of the HTTP protocol. They are meant to be stateless
> and user independent. They, however, can obtain user specific data from
> the execution context.
>
> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
Re: multi-user/settings with httpclient
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2011-01-28 at 14:43 +0100, khiem nguyen wrote:
> what about Interceptors (request & response) ?
> from my understanding, these are "properties" of HttpClient.
>
No, they are not. Protocol interceptors are strategies that implement a
particular aspect of the HTTP protocol. They are meant to be stateless
and user independent. They, however, can obtain user specific data from
the execution context.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: multi-user/settings with httpclient
Posted by khiem nguyen <kh...@googlemail.com>.
what about Interceptors (request & response) ?
from my understanding, these are "properties" of HttpClient.
thanx
khiemu
On Fri, Jan 28, 2011 at 12:10 PM, Oleg Kalnichevski <ol...@apache.org>wrote:
> On Fri, 2011-01-28 at 00:05 +0100, khiem nguyen wrote:
> > hi,
> > i want to use http-client to implement a kind of proxy-server, since
> it'll
> > be used by several users & each user can have different settings
> > (cookie-handling, headers-handling...), is there a better way than to
> give
> > each user 1 or more instances of httpclient which hold user-specific
> params
> > & 1 connection-manager for all these client instances ?
> >
> > thanx for your help
> >
> > khiemu
>
> You can use different instances of HttpContext, HttpParams, CookieStore,
> etc per individual user / thread of execution while sharing a single
> instance of HttpClient and a pooling connection manager for all users /
> threads.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
Re: multi-user/settings with httpclient
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2011-01-28 at 00:05 +0100, khiem nguyen wrote:
> hi,
> i want to use http-client to implement a kind of proxy-server, since it'll
> be used by several users & each user can have different settings
> (cookie-handling, headers-handling...), is there a better way than to give
> each user 1 or more instances of httpclient which hold user-specific params
> & 1 connection-manager for all these client instances ?
>
> thanx for your help
>
> khiemu
You can use different instances of HttpContext, HttpParams, CookieStore,
etc per individual user / thread of execution while sharing a single
instance of HttpClient and a pooling connection manager for all users /
threads.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org