/** * @deprecated (4.3) use * {@link BasicConnFactory#BasicConnFactory(SocketFactory, SSLSocketFactory, int, * SocketConfig, ConnectionConfig)}. */ @Deprecated public BasicConnFactory(final SSLSocketFactory sslfactory, final HttpParams params) { super(); Args.notNull(params, "HTTP params"); this.plainfactory = null; this.sslfactory = sslfactory; this.connectTimeout = params.getIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 0); this.sconfig = HttpParamConfig.getSocketConfig(params); this.connFactory = new DefaultBHttpClientConnectionFactory( HttpParamConfig.getConnectionConfig(params)); }
/** * @since 4.3 */ public BasicConnFactory( final SocketFactory plainfactory, final SSLSocketFactory sslfactory, final int connectTimeout, final SocketConfig sconfig, final ConnectionConfig cconfig) { super(); this.plainfactory = plainfactory; this.sslfactory = sslfactory; this.connectTimeout = connectTimeout; this.sconfig = sconfig != null ? sconfig : SocketConfig.DEFAULT; this.connFactory = new DefaultBHttpClientConnectionFactory( cconfig != null ? cconfig : ConnectionConfig.DEFAULT); }