users@jersey.java.net

[Jersey] Setting a retry handler in Jersey 2.x

From: Sean Landis <sean.landis_at_gmail.com>
Date: Wed, 9 Oct 2013 17:11:02 -0600

Hi,

I am trying to upgrade to Jersey 2.x. In 1.7.x we were able to create an
HttpClient, assign a retry handler directly, and provide the HttpClient to
the Jersey client to use. The HttpClient was version 3.x.

In Jersey 2.x, I am using an ApacheConnector which does the HttpClient
creation for me. The HttpClient is 4.x. I can retrieve said client, but the
new HttpClient 4 does not expose a way to assign a retry handler. The only
place I can find where the retry handler can be assigned is through the
HttpClientBuilder (which ApacheConnector doesn't seem to expose).

So how does one, in Jersey 2.x set a retry handler on the HttpClient?

Thanks,

Sean