org.apache.http.conn.SchemePortResolver Java Examples

The following examples show how to use org.apache.http.conn.SchemePortResolver. 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 File: ExtendedConnectionOperator.java    From lavaplayer with Apache License 2.0 5 votes vote down vote up
public ExtendedConnectionOperator(
    Lookup<ConnectionSocketFactory> socketFactoryRegistry,
    SchemePortResolver schemePortResolver,
    DnsResolver dnsResolver
) {
  this.socketFactoryRegistry = socketFactoryRegistry;
  this.schemePortResolver = schemePortResolver != null ? schemePortResolver : DefaultSchemePortResolver.INSTANCE;
  this.dnsResolver = dnsResolver != null ? dnsResolver : SystemDefaultDnsResolver.INSTANCE;
}
 
Example #2
Source File: IntegrationTestSupertypeLayer.java    From SolRDF with 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.
 */
@BeforeClass
public static void initITTest() {
	System.setProperty("tests.asserts", "false");	
	System.setProperty("jetty.port", "8080");
	System.setProperty("solr.core.name", "store");
	System.setProperty("solr.data.dir", initCoreDataDir.getAbsolutePath());
		
	try {
		SOLR = createJetty(
				"target/solrdf-integration-tests-1.1-dev/solrdf",
				JettyConfig.builder()
					.setPort(8080)
					.setContext("/solr")
					.stopAtShutdown(true)
					.build());		
		
		final HttpClient httpClient = HttpClientBuilder.create()
				.setRoutePlanner(
						new DefaultRoutePlanner(
								new SchemePortResolver() {
									@Override
									public int resolve(final HttpHost host) throws UnsupportedSchemeException {
										return SOLR.getLocalPort();
									}
								})).build();
		
		
		SOLRDF_CLIENT = SolRDF.newBuilder()
	              .withEndpoint("http://127.0.0.1:8080/solr/store")
	              .withGraphStoreProtocolEndpointPath("/rdf-graph-store")
	              .withHttpClient(httpClient)
	              .withSPARQLEndpointPath("/sparql")
	              .build();
		
		PLAIN_SOLR_CLIENT = new HttpSolrClient(SOLR_URI);
	} catch (final Exception exception) {
		throw new RuntimeException(exception);
	}
}
 
Example #3
Source File: HTTPAuthCache.java    From netcdf-java with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public HTTPAuthCache(final SchemePortResolver schemePortResolver) {
  super(schemePortResolver);
}
 
Example #4
Source File: BasicAuthCacheAlias.java    From camel-quarkus with Apache License 2.0 4 votes vote down vote up
@Alias
public BasicAuthCacheAlias(final SchemePortResolver schemePortResolver) {
}
 
Example #5
Source File: Substitute_RestClient.java    From quarkus with Apache License 2.0 4 votes vote down vote up
public NoSerializationBasicAuthCache(final SchemePortResolver schemePortResolver) {
    this.map = new ConcurrentHashMap<>();
    this.schemePortResolver = schemePortResolver != null ? schemePortResolver
            : DefaultSchemePortResolver.INSTANCE;
}