当前位置: 首页>>代码示例>>Java>>正文


Java DefaultSchemePortResolver.INSTANCE属性代码示例

本文整理汇总了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;
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:21,代码来源:ApacheConnectionManagerFactory.java

示例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;
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:19,代码来源:ApacheConnectionManagerFactory.java

示例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;
}
 
开发者ID:xxonehjh,项目名称:remote-files-sync,代码行数:11,代码来源:BasicAuthCache.java

示例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;
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:11,代码来源:BasicAuthCache.java

示例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;
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:10,代码来源:NexusHttpRoutePlanner.java

示例6: SdkProxyRoutePlanner

public SdkProxyRoutePlanner(String proxyHost, int proxyPort, Set<String> nonProxyHosts) {
    super(DefaultSchemePortResolver.INSTANCE);
    proxy = new HttpHost(proxyHost, proxyPort);
    this.hostPatterns = nonProxyHosts;
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:5,代码来源:SdkProxyRoutePlanner.java

示例7: SdkProxyRoutePlanner

public SdkProxyRoutePlanner(String proxyHost, int proxyPort, String nonProxyHosts) {
    super(DefaultSchemePortResolver.INSTANCE);
    proxy = new HttpHost(proxyHost, proxyPort);
    parseNonProxyHosts(nonProxyHosts);
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:5,代码来源:SdkProxyRoutePlanner.java

示例8: DefaultHostRoutePlanner

public DefaultHostRoutePlanner(String defaultHost) {
    super(DefaultSchemePortResolver.INSTANCE);
    this.defaultHost = new HttpHost(defaultHost);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:4,代码来源:HttpClientConfigurator.java

示例9: ApacheHttpClientEdgeGridRoutePlanner

public ApacheHttpClientEdgeGridRoutePlanner(ClientCredential clientCredential) {
    super(DefaultSchemePortResolver.INSTANCE);
    this.binding = new ApacheHttpClientEdgeGridRequestSigner(clientCredential);
}
 
开发者ID:akamai,项目名称:AkamaiOPEN-edgegrid-java,代码行数:4,代码来源:ApacheHttpClientEdgeGridRoutePlanner.java


注:本文中的org.apache.http.impl.conn.DefaultSchemePortResolver.INSTANCE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。