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:07:33 GMT
Hi Roland,

To implement disconnect I am doing following:

if(httpClient != null)
        {
            MultiThreadedHttpConnectionManager mt =
(MultiThreadedHttpConnectionManager)httpClient.getHttpConnectionManager(
);
            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.

So is it safe to use second option?

Regards,
Lalit

-----Original Message-----
From: Roland Weber [mailto:ROLWEBER@de.ibm.com] 
Sent: Thursday, January 18, 2007 4:15 PM
To: HttpClient User Discussion
Cc: httpclient-user@jakarta.apache.org
Subject: Re: How to implement disconnect

Hello Lalit,

> I am connecting to an http server and executing http request by using
> apache http client.
> 
> Then I want to disconnect. How can I implement disconnect?
> 
This is mentioned in the optimization guide:
http://jakarta.apache.org/commons/httpclient/performance.html#Connection
_persistence

best regards,
  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