_client = jerseyClient;
}
private static ApacheHttpClient4 createDefaultJerseyClient(HttpClientConfiguration configuration,
MetricRegistry metrics) {
HttpClient httpClient = new HttpClientBuilder(metrics).using(configuration).build("dictionary");
ApacheHttpClient4Handler handler = new ApacheHttpClient4Handler(httpClient, null, true);
ApacheHttpClient4Config config = new DefaultApacheHttpClient4Config();
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
config.getSingletons().add(new JacksonMessageBodyProvider(Jackson.newObjectMapper(), validator));
return new ApacheHttpClient4(handler, config);