Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEclipse
private static void configureHttpClient2Proxy(HttpClient httpClient, HttpMethod method) {
	String proxyHost = System.getProperty("http.proxyHost");
	if (proxyHost == null || "".equals(proxyHost)) {
		return;
	}
	try {
		org.apache.commons.httpclient.URI apacheUri = method.getURI();
		java.net.URI javaUri = null;
		if (apacheUri.isAbsoluteURI()==false) {
			javaUri = new 
			java.net.URI(httpClient.getHostConfiguration().getHostURL());
	} else {
		javaUri = new java.net.URI(apacheUri.toString());
	}
	// ProxySelector
	List<Proxy> selectedProxy = 
	ProxySelector.getDefault().select(javaUri);
	if (selectedProxy.size()==0 || 
	selectedProxy.get(0).type()==Proxy.Type.DIRECT) {
		// No proxy needed.
		return;
	}
	HostConfiguration hc = httpClient.getHostConfiguration();
	hc.setHost(javaUri.getHost(), javaUri.getPort(), 
	Protocol.getProtocol(javaUri.getScheme()));
	Proxy proxy = selectedProxy.get(0);
	InetSocketAddress proxyAddress = (InetSocketAddress) proxy.address();
	hc.setProxy(proxyAddress.getHostName(),proxyAddress.getPort());
	if (System.getProperty("http.proxyUserName") != null) {
		httpClient.getState().setProxyCredentials(null, null,
			new UsernamePasswordCredentials(System.getProperty("http.proxyUserName"), System.getProperty("http.proxyPassword")));
		httpClient.getState().setAuthenticationPreemptive(true);
	}


  } catch (URISyntaxException ex) {
		LOG.log(Level.WARNING, null, ex);
  } catch (URIException ex) {
		lOG.log(Level.WARNING, null, ex);
  }
}

 

Back to Top

 

...

 

Anchor
adding_custom_indicators_to_the_performance_dashboard
adding_custom_indicators_to_the_performance_dashboard

Adding Custom Indicators to the Performance Dashboard

The XperienCentral Performance Dashboard provides detailed information about how the parts of XperienCentral's infrastructure are functioning. The Performance Dashboard measures the speed and response time of page requests and internal queries as well as other settings that affect how XperienCentral is performing and rates the results according to the optimal expected results. The Performance Dashboard plugin is extensible, which allows you to create plugins that add custom performance indicators. Any custom indicators you create appear on a special tab named “Custom System Performance Indicators”.

...