use of uk.gov.ida.configuration.JerseyClientWithRetryBackoffConfiguration in project verify-hub by alphagov.
the class MatchingServiceRequestSenderTest method setBackOffClient.
private static void setBackOffClient() {
final List<String> exceptionsToCatch = List.of(ConnectTimeoutException.class.getName(), SocketException.class.getName(), SocketTimeoutException.class.getName(), NoHttpResponseException.class.getName());
JerseyClientWithRetryBackoffConfiguration jerseyClientConfiguration = aJerseyClientWithRetryBackoffHandlerConfiguration().withTimeout(Duration.seconds(1)).withRetryBackoffPeriod(Duration.seconds(1)).withRetryExceptionList(exceptionsToCatch).withChunkedEncodingEnabled(false).withNumRetries(2).build();
ClientProvider provider = new ClientProvider(samlSoapProxyApp.getEnvironment(), jerseyClientConfiguration, true, MatchingServiceRequestSenderTest.class.getSimpleName());
backOffClient = provider.get();
}
Aggregations