Removed 'http.socket-factory-registry' context attribute from public APIs
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1488984 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e34e868ddc
commit
bcabf224b8
|
@ -38,7 +38,6 @@ import org.apache.http.client.config.RequestConfig;
|
||||||
import org.apache.http.config.Lookup;
|
import org.apache.http.config.Lookup;
|
||||||
import org.apache.http.conn.routing.HttpRoute;
|
import org.apache.http.conn.routing.HttpRoute;
|
||||||
import org.apache.http.conn.routing.RouteInfo;
|
import org.apache.http.conn.routing.RouteInfo;
|
||||||
import org.apache.http.conn.socket.ConnectionSocketFactory;
|
|
||||||
import org.apache.http.cookie.CookieOrigin;
|
import org.apache.http.cookie.CookieOrigin;
|
||||||
import org.apache.http.cookie.CookieSpec;
|
import org.apache.http.cookie.CookieSpec;
|
||||||
import org.apache.http.cookie.CookieSpecProvider;
|
import org.apache.http.cookie.CookieSpecProvider;
|
||||||
|
@ -128,12 +127,6 @@ public class HttpClientContext extends HttpCoreContext {
|
||||||
*/
|
*/
|
||||||
public static final String AUTHSCHEME_REGISTRY = "http.authscheme-registry";
|
public static final String AUTHSCHEME_REGISTRY = "http.authscheme-registry";
|
||||||
|
|
||||||
/**
|
|
||||||
* Attribute name of a {@link org.apache.http.config.Lookup} object that represents
|
|
||||||
* the actual {@link ConnectionSocketFactory} registry.
|
|
||||||
*/
|
|
||||||
public static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attribute name of a {@link org.apache.http.client.config.RequestConfig} object that
|
* Attribute name of a {@link org.apache.http.client.config.RequestConfig} object that
|
||||||
* represents the actual request configuration.
|
* represents the actual request configuration.
|
||||||
|
@ -205,14 +198,6 @@ public class HttpClientContext extends HttpCoreContext {
|
||||||
setAttribute(AUTHSCHEME_REGISTRY, lookup);
|
setAttribute(AUTHSCHEME_REGISTRY, lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Lookup<ConnectionSocketFactory> getSocketFactoryRegistry() {
|
|
||||||
return getLookup(SOCKET_FACTORY_REGISTRY, ConnectionSocketFactory.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSocketFactoryRegistry(final Lookup<ConnectionSocketFactory> lookup) {
|
|
||||||
setAttribute(SOCKET_FACTORY_REGISTRY, lookup);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CredentialsProvider getCredentialsProvider() {
|
public CredentialsProvider getCredentialsProvider() {
|
||||||
return getAttribute(CREDS_PROVIDER, CredentialsProvider.class);
|
return getAttribute(CREDS_PROVIDER, CredentialsProvider.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*/
|
*/
|
||||||
public interface HttpClientConnectionManager {
|
public interface HttpClientConnectionManager {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new {@link ClientConnectionRequest}, from which a
|
* Returns a new {@link ClientConnectionRequest}, from which a
|
||||||
* {@link HttpClientConnection} can be obtained or the request can be
|
* {@link HttpClientConnection} can be obtained or the request can be
|
||||||
|
|
|
@ -42,7 +42,6 @@ import org.apache.http.config.SocketConfig;
|
||||||
import org.apache.http.conn.ConnectTimeoutException;
|
import org.apache.http.conn.ConnectTimeoutException;
|
||||||
import org.apache.http.conn.DnsResolver;
|
import org.apache.http.conn.DnsResolver;
|
||||||
import org.apache.http.conn.HttpClientConnectionManager;
|
import org.apache.http.conn.HttpClientConnectionManager;
|
||||||
import org.apache.http.conn.HttpHostConnectException;
|
|
||||||
import org.apache.http.conn.ManagedHttpClientConnection;
|
import org.apache.http.conn.ManagedHttpClientConnection;
|
||||||
import org.apache.http.conn.SchemePortResolver;
|
import org.apache.http.conn.SchemePortResolver;
|
||||||
import org.apache.http.conn.UnsupportedSchemeException;
|
import org.apache.http.conn.UnsupportedSchemeException;
|
||||||
|
@ -54,6 +53,8 @@ import org.apache.http.util.Args;
|
||||||
@Immutable
|
@Immutable
|
||||||
class HttpClientConnectionOperator {
|
class HttpClientConnectionOperator {
|
||||||
|
|
||||||
|
static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";
|
||||||
|
|
||||||
private final Log log = LogFactory.getLog(HttpClientConnectionManager.class);
|
private final Log log = LogFactory.getLog(HttpClientConnectionManager.class);
|
||||||
|
|
||||||
private final Lookup<ConnectionSocketFactory> socketFactoryRegistry;
|
private final Lookup<ConnectionSocketFactory> socketFactoryRegistry;
|
||||||
|
@ -75,8 +76,8 @@ class HttpClientConnectionOperator {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private Lookup<ConnectionSocketFactory> getSocketFactoryRegistry(final HttpContext context) {
|
private Lookup<ConnectionSocketFactory> getSocketFactoryRegistry(final HttpContext context) {
|
||||||
Lookup<ConnectionSocketFactory> reg = (Lookup<ConnectionSocketFactory>)
|
Lookup<ConnectionSocketFactory> reg = (Lookup<ConnectionSocketFactory>) context.getAttribute(
|
||||||
context.getAttribute(HttpClientContext.SOCKET_FACTORY_REGISTRY);
|
SOCKET_FACTORY_REGISTRY);
|
||||||
if (reg == null) {
|
if (reg == null) {
|
||||||
reg = this.socketFactoryRegistry;
|
reg = this.socketFactoryRegistry;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue