I'm having issues configuring or understanding how to configure client 
connectors.

What I'm trying to do is:
 - disable persistant connections altogether.
 - set a specific timeout policy.

Note: this is for the Apache httpclient connector, I've not tried with others.

Connection Persistence:
The only documentation I could find was: 
http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/324-restlet/130-restlet.html

According to this, it appears that setting the context property 
"clientKeepAlive" to a specific value will disable connection persistence. The 
necessary value isn't clear, so I've tried "close", "off", "no" and "false".

Whatever the configuration, the client's HTTP headers always contain a 
"Connection: Keep-Alive" entry.

Is there a way to disable connection persistence, at least for the Apache 
httpclient connector? If so, I'd be grateful for any help, I've struggled with 
this for a while and am no further than when I started.

Timeout handling
This is a documentation issue more than an implementation one. I'd like to set 
a timeout for both socket opening and content retrieval - a query shouldn't 
take more than x seconds to be established, nor should it take more than y 
seconds to complete. Note that in my specific case, setting x and y to the same 
value is perfectly acceptable.

Looking at the documentation 
(http://www.restlet.org/documentation/2.0/jse/ext/org/restlet/ext/httpclient/HttpClientHelper.html),
 I'm a bit confused.
- socketTimeout is probably the variable I want to set for connection 
establishment.
- I'm unsure what idleTimeout does. The documentation could describe both 
persistent connections timeout (if the connection hasn't been used for x ms, 
close it) or stalled connections. Either way, it doesn't look like what I'm 
looking for.

There are no other timeout related configuration variables that I can see in 
the documentation. Am I missing or misunderstanding something?

Thanks !

Nicolas

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2645568

Reply via email to