.maxPooledPerRoute(30) .establishConnectionTimeout(connectionTimeout, TimeUnit.SECONDS) .socketTimeout(readTimeout, TimeUnit.SECONDS)
tcm.setMaxTotal(that.getConnectionPoolSize()); if (that.getMaxPooledPerRoute() == 0) { that.maxPooledPerRoute(that.getConnectionPoolSize());
builder.maxPooledPerRoute(maxPooledPerRoute);
public MonitoringRhq(String deployment) { MetricProperties metricProperties = DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentMetricProperty(deployment); APPLICATION_JSON = "application/json"; REST_SERVER_PORT = Integer.parseInt(metricProperties.getRhqServerPort()); REST_SERVER_USERNAME = metricProperties.getRhqServerUsername(); REST_SERVER_PASSWORD = metricProperties.getRhqServerPassword(); REST_SERVER_ADDRESS = metricProperties.getRhqServerUrl(); ResteasyClient client = new ResteasyClientBuilder().connectionPoolSize(10).maxPooledPerRoute(5).build(); ResteasyWebTarget target = client.target("http://" + REST_SERVER_ADDRESS + ":" + REST_SERVER_PORT); target.register(new BasicAuthentication(REST_SERVER_USERNAME, REST_SERVER_PASSWORD)); postRhq = target.proxy(PostDataRhq.class); }
public MonitoringHawkular(String deployment) { MetricProperties metricProperties = DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentMetricProperty(deployment); APPLICATION_JSON = "application/json"; REST_SERVER_PORT = Integer.parseInt(metricProperties.getHawkularServerPort()); REST_SERVER_USERNAME = metricProperties.getHawkularServerUsername(); REST_SERVER_PASSWORD = metricProperties.getHawkularServerPassword(); REST_SERVER_ADDRESS = metricProperties.getHawkularServerUrl(); ResteasyClient client = new ResteasyClientBuilder().connectionPoolSize(10).maxPooledPerRoute(5).build(); ResteasyWebTarget target = client.target("http://" + REST_SERVER_ADDRESS + ":" + REST_SERVER_PORT); target.register(new BasicAuthentication(REST_SERVER_USERNAME, REST_SERVER_PASSWORD)); postHawkular = target.proxy(PostDataHawkular.class); }
public MonitoringRhq(String deployment) { MetricProperties metricProperties = DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentMetricProperty(deployment); APPLICATION_JSON = "application/json"; REST_SERVER_PORT = Integer.parseInt(metricProperties.getRhqServerPort()); REST_SERVER_USERNAME = metricProperties.getRhqServerUsername(); REST_SERVER_PASSWORD = metricProperties.getRhqServerPassword(); REST_SERVER_ADDRESS = metricProperties.getRhqServerUrl(); ResteasyClient client = new ResteasyClientBuilder().connectionPoolSize(10).maxPooledPerRoute(5).build(); ResteasyWebTarget target = client.target("http://" + REST_SERVER_ADDRESS + ":" + REST_SERVER_PORT); target.register(new BasicAuthentication(REST_SERVER_USERNAME, REST_SERVER_PASSWORD)); postRhq = target.proxy(PostDataRhq.class); }