hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gajo Csaba <csaba.g...@cosylab.com>
Subject Re: How to fail immediately on broken connection?
Date Thu, 18 Mar 2010 11:14:23 GMT
OK now for some reason the SessionRequestCallback object is working, and 
I was able to fix the problem.

Csaba


On 03/18/2010 11:58 AM, Gajo Csaba wrote:
> Hello,
>
> I was suing the asynchronous client example from [1] to write a simple 
> client. The problem is, when the server is not online, the connection 
> just halts and waits, due to the CountDownLatch. I thought that the 
> SessionRequestCallback object was supposed to deal with this? However, 
> when I try to connect, the completed() method immediately returns 
> success is true, and I'm left hanging. The failed() method is never 
> invoked. Why is that?
>
> Basically, what I want to do is, if the server is not available, to 
> just print out some message. How to do that?
>
> Thanks, Csaba
>
> [1] - 
> http://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>


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


Mime
View raw message