hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lalit Sahoo" <lali...@sonata-software.com>
Subject RE: How to implement disconnect
Date Thu, 18 Jan 2007 11:35:02 GMT
Hi Roland,

I am using only one instance of HttpClient in my application and I am
creating this by using httpClient = new HttpClient(connManager);

So I will have only one instance of MultiThreadedHttpConnectionManager.

In this case if I will use
MultiThreadedHttpConnectionManager.shutDownAll() then It will shut down
all instances including those not related to this instance of
HttpClient.

Could you please verify my understanding?

Regards,
Lalit

-----Original Message-----
From: Roland Weber [mailto:ROLWEBER@de.ibm.com] 
Sent: Thursday, January 18, 2007 4:45 PM
To: HttpClient User Discussion
Subject: RE: How to implement disconnect

Hello Lalit,

>             if(mt != null)
>             {
>                 mt.shutdown();
>             }
>         }
> 
> Another option is to call
> MultiThreadedHttpConnectionManager.shutDownALL().
> 
> In the second option all the static resources will be release and all
> threads will be stopped.

If you want to shut down _one_ connection manager, use the first option.
If you want to shut down _all_ connection managers, use the second
option.

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message