cc.connectorProvider(new ApacheConnectorProvider());
return ClientBuilder.newClient(cc);
}
protected Client createPoolingClient() {
ClientConfig cc = new ClientConfig();
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(100);
connectionManager.setDefaultMaxPerRoute(100);
cc.property(ApacheClientProperties.CONNECTION_MANAGER, connectionManager);
cc.connectorProvider(new ApacheConnectorProvider());
return ClientBuilder.newClient(cc);
}