I also need this feature (custom timeout per exchange) to be introduced to Jetty 6.x. That is why I created simple fix against http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1. The patch is attached to this JIRA and contains both the fix and a testcase.
This fix introduces a new property to the HttpExchange - a property that holds a delay to be added to the default timeout used inside HttpClient.
Alternatively, a new method could be introduced to the HttpClient:
public void send(HttpExchange exchange,long timeoutDelay)
However, this would require one or two methods to be added to the HttpDestination class and one would also need to be added to HttpConnection. That is why I chose the first approach (with modifying HttpExchange).
Thanks,
Bartek
Yes, this is currently not possible because we use the jetty Timeout class, one instance for the httpclient and the timeout implementation has the duration specified applied to all tasks in the queue. I understand the desire for ultimate flexibility but is there a good use case that makes this a requirement over simply a nice to have?