On Thu, 2012-03-22 at 02:54 -0700, diyfiesta wrote:
> Great stuff...
>
> Something like this?
>
Yep.
Oleg
> DefaultHttpClient client = new DefaultHttpClient(connectionManager,
> httpParameters) {
> @Override
> protected RequestDirector
> createClientRequestDirector(HttpRequestExecutor requestExec,
> ClientConnectionManager conman, ConnectionReuseStrategy reustrat,
> ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan, HttpProcessor
> httpProcessor, HttpRequestRetryHandler retryHandler, RedirectStrategy
> redirectStrategy, AuthenticationHandler targetAuthHandler,
> AuthenticationHandler proxyAuthHandler, UserTokenHandler stateHandler,
> HttpParams params) {
> return new
> DefaultRequestDirector(LogFactory.getLog(AbstractHttpClient.class),
> requestExec, conman, reustrat, kastrat, rouplan, httpProcessor,
> retryHandler, redirectStrategy, targetAuthHandler, proxyAuthHandler,
> stateHandler, params) {
> @Override
> protected boolean createTunnelToProxy(HttpRoute route,
> int hop, HttpContext context) throws HttpException, IOException {
> // my stuff here!
> return super.createTunnelToProxy(route, hop,
> context);
> }
> };
> }
> };
>
> I just wanted to check because there may be a neater way to wire in my
> custom class that I didn't spot...
>
> Thanks
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]