Search code examples
restlet

org.restlet.Context timeout value


When org.restlet.Context is using Apache HttpClient to make the connection, how do I specify the timeout period the client should wait for the server to respond. Here is what I have so far

    final Context context = new Context();
    context.getParameters().add("socketTimeout", "10000");
    context.getParameters().add("", "10000"); //?? connectionTimeout

    ClientResource clientResource = new ClientResource(context, ss.getUrl());

Is there documentation for the possible parameter values and their meaning?


Solution

  • In fact, all supported parameters for the HttpClient extension are described in this page: http://www.restlet.org/documentation/snapshot/jee/ext/org/restlet/ext/httpclient/HttpClientHelper.html

    In your case, it seems that the idleTimeout parameter should bother.