org.apache.http.nio.conn.NoopIOSessionStrategy源码实例Demo

类org.apache.http.nio.conn.NoopIOSessionStrategy源码实例Demo

下面列出了org.apache.http.nio.conn.NoopIOSessionStrategy 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: log4j2-elasticsearch   文件: HttpClientFactory.java
public HttpClientFactory build() {

            if (this.sslSocketFactory == null) {
                this.sslSocketFactory = SSLConnectionSocketFactory.getSocketFactory();
            }
            if (this.plainSocketFactory == null) {
                this.plainSocketFactory = PlainConnectionSocketFactory.getSocketFactory();
            }
            if (this.httpIOSessionStrategy == null) {
                this.httpIOSessionStrategy = NoopIOSessionStrategy.INSTANCE;
            }
            if (this.httpsIOSessionStrategy == null) {
                this.httpsIOSessionStrategy = SSLIOSessionStrategy.getSystemDefaultStrategy();
            }

            return new HttpClientFactory(this);
        }
 
源代码2 项目: cetty   文件: AsyncHttpClientGenerator.java
@Override
protected Registry<SchemeIOSessionStrategy> registry() {
    return RegistryBuilder
            .<SchemeIOSessionStrategy>create()
            .register("http", NoopIOSessionStrategy.INSTANCE)
            .register("https", buildSSLIOSessionStrategy())
            .build();
}
 
源代码3 项目: light   文件: RestClient.java
private Registry<SchemeIOSessionStrategy> asyncRegistry() throws Exception {
    // Allow TLSv1 protocol only
    SSLIOSessionStrategy sslSessionStrategy = new SSLIOSessionStrategy(
            sslContext(),
            new String[] { "TLSv1" },
            null,
            hostnameVerifier());

    // Create a registry of custom connection session strategies for supported
    // protocol schemes.
    return RegistryBuilder.<SchemeIOSessionStrategy>create()
            .register("http", NoopIOSessionStrategy.INSTANCE)
            .register("https", sslSessionStrategy)
            .build();
}
 
protected static Registry<SchemeIOSessionStrategy> getDefaultRegistry() {
    return RegistryBuilder.<SchemeIOSessionStrategy>create().register("http", NoopIOSessionStrategy.INSTANCE)
            .register("https", SSLIOSessionStrategy.getDefaultStrategy()).build();
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法