John,

I found that these timeout values don't work sometimes with HTTPClient
3. We had a failcase that connection timeout is several minutes when
firewall blocks the request.

If this problem is widespread, it may be a good idea to add an option
to run the request in a timer-thread using the technique mentioned by
Paul.

Zhihong

On Jul 24, 9:49 pm, John Kristian <[email protected]> wrote:
> The third parameter to getRequestToken is sent to the server, not
> passed to the HTTP client library.  This should work better:
>
> OAuthClient client = ...
> client.getHttpParameters().put(HttpClient.CONNECT_TIMEOUT, 3*1000);
> client.getHttpParameters().put(HttpClient.READ_TIMEOUT, 6*1000);
> client.getRequestToken(accessor, null, null);
>
> On Jul 24, 5:15 am, Mariusz <[email protected]> wrote:
>
>
>
> > Could someone tell me how I can set timeout for
> > OAuthClient.getRequestToken() in Java? I have already tried this:
>
> > OAuthClient httpClient = new OAuthClient(new HttpClient4());
>
> > HashMap<String,Integer> params = new HashMap<String,Integer>();
> > params.put(HttpClient.CONNECT_TIMEOUT, 3*1000);
> > params.put(HttpClient.READ_TIMEOUT, 6*1000);
> > Set<Map.Entry<String, Integer>> setParams = params.entrySet();
>
> > httpClient.getRequestToken(accessor, null, setParams);
>
> > Unfortunately timeout is very long (longer than 6000 msecs) still. Can
> > I set my timeout?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to