org.apache.http.impl.conn.DefaultRoutePlanner Java Examples

The following examples show how to use org.apache.http.impl.conn.DefaultRoutePlanner. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: Openfire   Author: igniterealtime   File:    License: Apache License 2.0 5 votes vote down vote up
private HttpRoutePlanner getRoutePlanner() {
    if (isUsingProxy()) {
        return new DefaultProxyRoutePlanner(new HttpHost(getProxyHost(), getProxyPort()));
    } else {
        return new DefaultRoutePlanner(null);
Example #2
Source Project: SolRDF   Author: SeaseLtd   File:    License: Apache License 2.0 5 votes vote down vote up
 * Initilisation procedure for this test case.
 * @throws UnableToBuildSolRDFClientException in case the client cannot be built.
 * @throws Exception in case of Solr startup failure.
public static void initITTest() {
	System.setProperty("tests.asserts", "false");	
	System.setProperty("jetty.port", "8080");
	System.setProperty("", "store");
	System.setProperty("", initCoreDataDir.getAbsolutePath());
	try {
		SOLR = createJetty(
		final HttpClient httpClient = HttpClientBuilder.create()
						new DefaultRoutePlanner(
								new SchemePortResolver() {
									public int resolve(final HttpHost host) throws UnsupportedSchemeException {
										return SOLR.getLocalPort();
		SOLRDF_CLIENT = SolRDF.newBuilder()
		PLAIN_SOLR_CLIENT = new HttpSolrClient(SOLR_URI);
	} catch (final Exception exception) {
		throw new RuntimeException(exception);