本文整理了Java中org.apache.http.conn.ssl.SSLSocketFactory.getSystemSocketFactory()
方法的一些代码示例,展示了SSLSocketFactory.getSystemSocketFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLSocketFactory.getSystemSocketFactory()
方法的具体详情如下:
包路径:org.apache.http.conn.ssl.SSLSocketFactory
类名称:SSLSocketFactory
方法名:getSystemSocketFactory
[英]Obtains default SSL socket factory with an SSL context based on system properties as described in "JavaTM Secure Socket Extension (JSSE) Reference Guide for the JavaTM 2 Platform Standard Edition 5
[中]根据"JavaTM Secure Socket Extension (JSSE) Reference Guide for the JavaTM 2 Platform Standard Edition 5中描述的系统属性,使用SSL上下文获取默认SSL套接字工厂
代码示例来源:origin: taskadapter/redmine-java-api
/**
* Creates system default connection manager. Takes in account system
* properties for SSL configuration.
*
* @return default insecure connection manager.
*/
public static ClientConnectionManager createSystemDefaultConnectionManager() {
return createConnectionManager(SSLSocketFactory.getSystemSocketFactory());
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient
new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
registry.register(
new Scheme("https", 443, SSLSocketFactory.getSystemSocketFactory()));
return registry;
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
registry.register(
new Scheme("https", 443, SSLSocketFactory.getSystemSocketFactory()));
return registry;
代码示例来源:origin: com.hynnet/httpclient
new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
registry.register(
new Scheme("https", 443, SSLSocketFactory.getSystemSocketFactory()));
return registry;
代码示例来源:origin: Nextdoor/bender
new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
registry.register(
new Scheme("https", 443, SSLSocketFactory.getSystemSocketFactory()));
return registry;
代码示例来源:origin: net.anthavio/hatatitla
protected PoolingClientConnectionManager buildConnectionManager() {
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
SSLContext sslContext = getSslContext();
if (sslContext != null) {
SSLSocketFactory sslSocketFactory = new SSLSocketFactory(sslContext);
schemeRegistry.register(new Scheme("https", 443, sslSocketFactory));
} else {
schemeRegistry.register(new Scheme("https", 443, SSLSocketFactory.getSystemSocketFactory()));
}
//we access only one host
PoolingClientConnectionManager connectionManager = new PoolingClientConnectionManager(schemeRegistry,
this.poolReleaseTimeoutMillis, TimeUnit.MILLISECONDS);
connectionManager.setMaxTotal(getPoolMaximumSize());
connectionManager.setDefaultMaxPerRoute(getPoolMaximumSize());
return connectionManager;
}
内容来源于网络,如有侵权,请联系作者删除!