本文整理汇总了Java中org.apache.http.impl.conn.DefaultSchemePortResolver.INSTANCE属性的典型用法代码示例。如果您正苦于以下问题:Java DefaultSchemePortResolver.INSTANCE属性的具体用法?Java DefaultSchemePortResolver.INSTANCE怎么用?Java DefaultSchemePortResolver.INSTANCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.http.impl.conn.DefaultSchemePortResolver
的用法示例。
在下文中一共展示了DefaultSchemePortResolver.INSTANCE属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
@Override
public HttpClientConnectionManager create(final HttpClientSettings settings) {
ConnectionSocketFactory sslsf = getPreferredSocketFactory(settings);
final PoolingHttpClientConnectionManager cm = new
PoolingHttpClientConnectionManager(
createSocketFactoryRegistry(sslsf),
null,
DefaultSchemePortResolver.INSTANCE,
new DelegatingDnsResolver(settings.getDnsResolver()),
settings.getConnectionPoolTTL(),
TimeUnit.MILLISECONDS);
cm.setValidateAfterInactivity(settings.getValidateAfterInactivityMillis());
cm.setDefaultMaxPerRoute(settings.getMaxConnections());
cm.setMaxTotal(settings.getMaxConnections());
cm.setDefaultSocketConfig(buildSocketConfig(settings));
cm.setDefaultConnectionConfig(buildConnectionConfig(settings));
return cm;
}
示例2: create
public HttpClientConnectionManager create(ApacheSdkHttpClientFactory configuration,
AttributeMap standardOptions) {
ConnectionSocketFactory sslsf = getPreferredSocketFactory(standardOptions);
final PoolingHttpClientConnectionManager cm = new
PoolingHttpClientConnectionManager(
createSocketFactoryRegistry(sslsf),
null,
DefaultSchemePortResolver.INSTANCE,
null,
configuration.connectionTimeToLive().orElse(Defaults.CONNECTION_POOL_TTL).toMillis(),
TimeUnit.MILLISECONDS);
cm.setDefaultMaxPerRoute(standardOptions.get(SdkHttpConfigurationOption.MAX_CONNECTIONS));
cm.setMaxTotal(standardOptions.get(SdkHttpConfigurationOption.MAX_CONNECTIONS));
cm.setDefaultSocketConfig(buildSocketConfig(standardOptions));
return cm;
}
示例3: BasicAuthCache
/**
* Default constructor.
*
* @since 4.3
*/
public BasicAuthCache(final SchemePortResolver schemePortResolver) {
super();
this.map = new HashMap<HttpHost, AuthScheme>();
this.schemePortResolver = schemePortResolver != null ? schemePortResolver :
DefaultSchemePortResolver.INSTANCE;
}
示例4: BasicAuthCache
/**
* Default constructor.
*
* @since 4.3
*/
public BasicAuthCache(final SchemePortResolver schemePortResolver) {
super();
this.map = new ConcurrentHashMap<HttpHost, byte[]>();
this.schemePortResolver = schemePortResolver != null ? schemePortResolver :
DefaultSchemePortResolver.INSTANCE;
}
示例5: NexusHttpRoutePlanner
/**
* @since 2.5
*/
public NexusHttpRoutePlanner(final Map<String, HttpHost> proxies,
@Nullable final Pattern nonProxyHostsPattern)
{
super(DefaultSchemePortResolver.INSTANCE);
this.proxies = checkNotNull(proxies);
this.nonProxyHostPattern = nonProxyHostsPattern;
}
示例6: SdkProxyRoutePlanner
public SdkProxyRoutePlanner(String proxyHost, int proxyPort, Set<String> nonProxyHosts) {
super(DefaultSchemePortResolver.INSTANCE);
proxy = new HttpHost(proxyHost, proxyPort);
this.hostPatterns = nonProxyHosts;
}
示例7: SdkProxyRoutePlanner
public SdkProxyRoutePlanner(String proxyHost, int proxyPort, String nonProxyHosts) {
super(DefaultSchemePortResolver.INSTANCE);
proxy = new HttpHost(proxyHost, proxyPort);
parseNonProxyHosts(nonProxyHosts);
}
示例8: DefaultHostRoutePlanner
public DefaultHostRoutePlanner(String defaultHost) {
super(DefaultSchemePortResolver.INSTANCE);
this.defaultHost = new HttpHost(defaultHost);
}
示例9: ApacheHttpClientEdgeGridRoutePlanner
public ApacheHttpClientEdgeGridRoutePlanner(ClientCredential clientCredential) {
super(DefaultSchemePortResolver.INSTANCE);
this.binding = new ApacheHttpClientEdgeGridRequestSigner(clientCredential);
}