Added release version to deprecation annotations; removed references to deprecated methods / classes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1335088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa412a29b9
commit
a8d2e5e5fa
|
@ -147,7 +147,7 @@ public class CacheConfig {
|
||||||
* Returns the current maximum response body size that will be cached.
|
* Returns the current maximum response body size that will be cached.
|
||||||
* @return size in bytes
|
* @return size in bytes
|
||||||
*
|
*
|
||||||
* @deprecated use {@link #getMaxObjectSize()}
|
* @deprecated (4.2) use {@link #getMaxObjectSize()}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public int getMaxObjectSizeBytes() {
|
public int getMaxObjectSizeBytes() {
|
||||||
|
@ -158,7 +158,7 @@ public class CacheConfig {
|
||||||
* Specifies the maximum response body size that will be eligible for caching.
|
* Specifies the maximum response body size that will be eligible for caching.
|
||||||
* @param maxObjectSizeBytes size in bytes
|
* @param maxObjectSizeBytes size in bytes
|
||||||
*
|
*
|
||||||
* @deprecated use {@link #setMaxObjectSize(long)}
|
* @deprecated (4.2) use {@link #setMaxObjectSize(long)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setMaxObjectSizeBytes(int maxObjectSizeBytes) {
|
public void setMaxObjectSizeBytes(int maxObjectSizeBytes) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.http.Consts;
|
||||||
import org.apache.http.Header;
|
import org.apache.http.Header;
|
||||||
import org.apache.http.HeaderElement;
|
import org.apache.http.HeaderElement;
|
||||||
import org.apache.http.HttpHost;
|
import org.apache.http.HttpHost;
|
||||||
|
@ -44,7 +45,6 @@ import org.apache.http.HttpRequest;
|
||||||
import org.apache.http.annotation.Immutable;
|
import org.apache.http.annotation.Immutable;
|
||||||
import org.apache.http.client.cache.HeaderConstants;
|
import org.apache.http.client.cache.HeaderConstants;
|
||||||
import org.apache.http.client.cache.HttpCacheEntry;
|
import org.apache.http.client.cache.HttpCacheEntry;
|
||||||
import org.apache.http.protocol.HTTP;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
|
@ -166,10 +166,10 @@ class CacheKeyGenerator {
|
||||||
if (!first) {
|
if (!first) {
|
||||||
buf.append("&");
|
buf.append("&");
|
||||||
}
|
}
|
||||||
buf.append(URLEncoder.encode(headerName, HTTP.UTF_8));
|
buf.append(URLEncoder.encode(headerName, Consts.UTF_8.name()));
|
||||||
buf.append("=");
|
buf.append("=");
|
||||||
buf.append(URLEncoder.encode(getFullHeaderValue(req.getHeaders(headerName)),
|
buf.append(URLEncoder.encode(getFullHeaderValue(req.getHeaders(headerName)),
|
||||||
HTTP.UTF_8));
|
Consts.UTF_8.name()));
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
buf.append("}");
|
buf.append("}");
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.apache.http.annotation.Immutable;
|
||||||
import org.apache.http.client.ClientProtocolException;
|
import org.apache.http.client.ClientProtocolException;
|
||||||
import org.apache.http.client.cache.HeaderConstants;
|
import org.apache.http.client.cache.HeaderConstants;
|
||||||
import org.apache.http.entity.AbstractHttpEntity;
|
import org.apache.http.entity.AbstractHttpEntity;
|
||||||
|
import org.apache.http.entity.ContentType;
|
||||||
import org.apache.http.impl.client.RequestWrapper;
|
import org.apache.http.impl.client.RequestWrapper;
|
||||||
import org.apache.http.message.BasicHeader;
|
import org.apache.http.message.BasicHeader;
|
||||||
import org.apache.http.message.BasicHttpResponse;
|
import org.apache.http.message.BasicHttpResponse;
|
||||||
|
@ -184,7 +185,8 @@ class RequestProtocolCompliance {
|
||||||
|
|
||||||
private void addContentTypeHeaderIfMissing(HttpEntityEnclosingRequest request) {
|
private void addContentTypeHeaderIfMissing(HttpEntityEnclosingRequest request) {
|
||||||
if (request.getEntity().getContentType() == null) {
|
if (request.getEntity().getContentType() == null) {
|
||||||
((AbstractHttpEntity) request.getEntity()).setContentType(HTTP.OCTET_STREAM_TYPE);
|
((AbstractHttpEntity) request.getEntity()).setContentType(
|
||||||
|
ContentType.APPLICATION_OCTET_STREAM.getMimeType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,8 @@ public class MemcachedHttpCacheStorage implements HttpCacheStorage {
|
||||||
* @param client how to talk to <i>memcached</i>
|
* @param client how to talk to <i>memcached</i>
|
||||||
* @param config apply HTTP cache-related options
|
* @param config apply HTTP cache-related options
|
||||||
* @param serializer <b>ignored</b>
|
* @param serializer <b>ignored</b>
|
||||||
|
*
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MemcachedHttpCacheStorage(MemcachedClientIF client, CacheConfig config,
|
public MemcachedHttpCacheStorage(MemcachedClientIF client, CacheConfig config,
|
||||||
|
|
|
@ -121,7 +121,7 @@ public interface AuthScheme {
|
||||||
*
|
*
|
||||||
* @return the authorization string
|
* @return the authorization string
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
|
* @deprecated (4.1) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Header authenticate(Credentials credentials, HttpRequest request)
|
Header authenticate(Credentials credentials, HttpRequest request)
|
||||||
|
|
|
@ -157,13 +157,16 @@ public class AuthState {
|
||||||
/**
|
/**
|
||||||
* Invalidates the authentication state by resetting its parameters.
|
* Invalidates the authentication state by resetting its parameters.
|
||||||
*
|
*
|
||||||
* @deprecated use {@link #reset()}
|
* @deprecated (4.2) use {@link #reset()}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void invalidate() {
|
public void invalidate() {
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
return this.authScheme != null;
|
return this.authScheme != null;
|
||||||
|
@ -174,7 +177,7 @@ public class AuthState {
|
||||||
*
|
*
|
||||||
* @param authScheme the {@link AuthScheme authentication scheme}
|
* @param authScheme the {@link AuthScheme authentication scheme}
|
||||||
*
|
*
|
||||||
* @deprecated use {@link #update(AuthScheme, Credentials)}
|
* @deprecated (4.2) use {@link #update(AuthScheme, Credentials)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setAuthScheme(final AuthScheme authScheme) {
|
public void setAuthScheme(final AuthScheme authScheme) {
|
||||||
|
@ -190,7 +193,7 @@ public class AuthState {
|
||||||
*
|
*
|
||||||
* @param credentials User credentials
|
* @param credentials User credentials
|
||||||
*
|
*
|
||||||
* @deprecated use {@link #update(AuthScheme, Credentials)}
|
* @deprecated (4.2) use {@link #update(AuthScheme, Credentials)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setCredentials(final Credentials credentials) {
|
public void setCredentials(final Credentials credentials) {
|
||||||
|
@ -202,7 +205,7 @@ public class AuthState {
|
||||||
*
|
*
|
||||||
* @return actual authentication scope if available, <code>null</code otherwise
|
* @return actual authentication scope if available, <code>null</code otherwise
|
||||||
*
|
*
|
||||||
* @deprecated do not use.
|
* @deprecated (4.2) do not use.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public AuthScope getAuthScope() {
|
public AuthScope getAuthScope() {
|
||||||
|
@ -214,7 +217,7 @@ public class AuthState {
|
||||||
*
|
*
|
||||||
* @param authScope Authentication scope
|
* @param authScope Authentication scope
|
||||||
*
|
*
|
||||||
* @deprecated do not use.
|
* @deprecated (4.2) do not use.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setAuthScope(final AuthScope authScope) {
|
public void setAuthScope(final AuthScope authScope) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link AuthenticationStrategy}
|
* @deprecated (4.2) use {@link AuthenticationStrategy}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface AuthenticationHandler {
|
public interface AuthenticationHandler {
|
||||||
|
|
|
@ -44,7 +44,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link RedirectStrategy}
|
* @deprecated (4.1) use {@link RedirectStrategy}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface RedirectHandler {
|
public interface RedirectHandler {
|
||||||
|
|
|
@ -34,13 +34,13 @@ package org.apache.http.client.params;
|
||||||
public interface ClientPNames {
|
public interface ClientPNames {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name";
|
public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated do not use
|
* @deprecated (4.0) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory-object";
|
public static final String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory-object";
|
||||||
|
|
|
@ -51,11 +51,17 @@ public class ClientParamBean extends HttpAbstractParamBean {
|
||||||
super(params);
|
super(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.0) do not use.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setConnectionManagerFactoryClassName (final String factory) {
|
public void setConnectionManagerFactoryClassName (final String factory) {
|
||||||
params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME, factory);
|
params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME, factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setConnectionManagerFactory(ClientConnectionManagerFactory factory) {
|
public void setConnectionManagerFactory(ClientConnectionManagerFactory factory) {
|
||||||
params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY, factory);
|
params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY, factory);
|
||||||
|
|
|
@ -95,7 +95,7 @@ public interface ClientContext {
|
||||||
public static final String PROXY_AUTH_STATE = "http.auth.proxy-scope";
|
public static final String PROXY_AUTH_STATE = "http.auth.proxy-scope";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated do not use
|
* @deprecated (4.1) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final String AUTH_SCHEME_PREF = "http.auth.scheme-pref";
|
public static final String AUTH_SCHEME_PREF = "http.auth.scheme-pref";
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class ClientContextConfigurer implements ClientContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated (4.1-alpha1) Use {@link HttpParams#setParameter(String, Object)} to set the parameters
|
* @deprecated (4.0) Use {@link HttpParams#setParameter(String, Object)} to set the parameters
|
||||||
* {@link org.apache.http.auth.params.AuthPNames#TARGET_AUTH_PREF AuthPNames#TARGET_AUTH_PREF} and
|
* {@link org.apache.http.auth.params.AuthPNames#TARGET_AUTH_PREF AuthPNames#TARGET_AUTH_PREF} and
|
||||||
* {@link org.apache.http.auth.params.AuthPNames#PROXY_AUTH_PREF AuthPNames#PROXY_AUTH_PREF} instead
|
* {@link org.apache.http.auth.params.AuthPNames#PROXY_AUTH_PREF AuthPNames#PROXY_AUTH_PREF} instead
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -55,7 +55,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*
|
*
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
*
|
*
|
||||||
* @deprecated use {@link AuthenticationStrategy}
|
* @deprecated (4.2) use {@link AuthenticationStrategy}
|
||||||
*/
|
*/
|
||||||
@Immutable
|
@Immutable
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -104,7 +104,9 @@ public class BasicManagedEntity extends HttpEntityWrapper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
/**
|
||||||
|
* @deprecated (4.1) Use {@link EntityUtils#consume(HttpEntity)}
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void consumeContent() throws IOException {
|
public void consumeContent() throws IOException {
|
||||||
ensureConsumed();
|
ensureConsumed();
|
||||||
|
|
|
@ -53,7 +53,7 @@ import org.apache.http.params.HttpParams;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated Do not use. For multihome support socket factories must implement
|
* @deprecated (4.1) Do not use. For multihome support socket factories must implement
|
||||||
* {@link SchemeSocketFactory} interface.
|
* {@link SchemeSocketFactory} interface.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -27,9 +27,7 @@
|
||||||
|
|
||||||
package org.apache.http.conn.params;
|
package org.apache.http.conn.params;
|
||||||
|
|
||||||
import org.apache.http.annotation.NotThreadSafe;
|
import org.apache.http.impl.conn.DefaultHttpResponseParser;
|
||||||
|
|
||||||
import org.apache.http.impl.conn.DefaultResponseParser;
|
|
||||||
import org.apache.http.params.HttpAbstractParamBean;
|
import org.apache.http.params.HttpAbstractParamBean;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
@ -39,8 +37,9 @@ import org.apache.http.params.HttpParams;
|
||||||
* using Java Beans conventions.
|
* using Java Beans conventions.
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
|
*
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@NotThreadSafe
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class ConnConnectionParamBean extends HttpAbstractParamBean {
|
public class ConnConnectionParamBean extends HttpAbstractParamBean {
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ public class ConnConnectionParamBean extends HttpAbstractParamBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use custom {@link DefaultResponseParser} implementation
|
* @deprecated (4.2) Use custom {@link DefaultHttpResponseParser} implementation
|
||||||
*/
|
*/
|
||||||
public void setMaxStatusLineGarbage (final int maxStatusLineGarbage) {
|
public void setMaxStatusLineGarbage (final int maxStatusLineGarbage) {
|
||||||
params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, maxStatusLineGarbage);
|
params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, maxStatusLineGarbage);
|
||||||
|
|
|
@ -26,14 +26,13 @@
|
||||||
|
|
||||||
package org.apache.http.conn.params;
|
package org.apache.http.conn.params;
|
||||||
|
|
||||||
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
|
|
||||||
import org.apache.http.params.CoreConnectionPNames;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameter names for connection managers in HttpConn.
|
* Parameter names for connection managers in HttpConn.
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*
|
||||||
|
* @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface ConnManagerPNames {
|
public interface ConnManagerPNames {
|
||||||
|
|
||||||
|
@ -43,10 +42,7 @@ public interface ConnManagerPNames {
|
||||||
* {@link org.apache.http.conn.ClientConnectionManager}.
|
* {@link org.apache.http.conn.ClientConnectionManager}.
|
||||||
* <p>
|
* <p>
|
||||||
* This parameter expects a value of type {@link Long}.
|
* This parameter expects a value of type {@link Long}.
|
||||||
* <p>
|
|
||||||
* @deprecated use {@link CoreConnectionPNames#CONNECTION_TIMEOUT}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static final String TIMEOUT = "http.conn-manager.timeout";
|
public static final String TIMEOUT = "http.conn-manager.timeout";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,10 +52,7 @@ public interface ConnManagerPNames {
|
||||||
* <p>
|
* <p>
|
||||||
* This parameter expects a value of type {@link ConnPerRoute}.
|
* This parameter expects a value of type {@link ConnPerRoute}.
|
||||||
* <p>
|
* <p>
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#setMaxForRoute(org.apache.http.conn.routing.HttpRoute, int)},
|
|
||||||
* {@link ThreadSafeClientConnManager#getMaxForRoute(org.apache.http.conn.routing.HttpRoute)}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static final String MAX_CONNECTIONS_PER_ROUTE = "http.conn-manager.max-per-route";
|
public static final String MAX_CONNECTIONS_PER_ROUTE = "http.conn-manager.max-per-route";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,11 +61,7 @@ public interface ConnManagerPNames {
|
||||||
* and applies to individual manager instances.
|
* and applies to individual manager instances.
|
||||||
* <p>
|
* <p>
|
||||||
* This parameter expects a value of type {@link Integer}.
|
* This parameter expects a value of type {@link Integer}.
|
||||||
* <p>
|
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#setMaxTotal(int)},
|
|
||||||
* {@link ThreadSafeClientConnManager#getMaxTotal()}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static final String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total";
|
public static final String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,8 @@ import org.apache.http.params.HttpParams;
|
||||||
* using Java Beans conventions.
|
* using Java Beans conventions.
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
|
*
|
||||||
|
* @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
|
||||||
*/
|
*/
|
||||||
@NotThreadSafe
|
@NotThreadSafe
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -51,14 +53,10 @@ public class ConnManagerParamBean extends HttpAbstractParamBean {
|
||||||
params.setLongParameter(ConnManagerPNames.TIMEOUT, timeout);
|
params.setLongParameter(ConnManagerPNames.TIMEOUT, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @see ConnManagerPNames#MAX_TOTAL_CONNECTIONS */
|
|
||||||
@Deprecated
|
|
||||||
public void setMaxTotalConnections (final int maxConnections) {
|
public void setMaxTotalConnections (final int maxConnections) {
|
||||||
params.setIntParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, maxConnections);
|
params.setIntParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, maxConnections);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @see ConnManagerPNames#MAX_CONNECTIONS_PER_ROUTE */
|
|
||||||
@Deprecated
|
|
||||||
public void setConnectionsPerRoute(final ConnPerRouteBean connPerRoute) {
|
public void setConnectionsPerRoute(final ConnPerRouteBean connPerRoute) {
|
||||||
params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, connPerRoute);
|
params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, connPerRoute);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ package org.apache.http.conn.params;
|
||||||
import org.apache.http.annotation.Immutable;
|
import org.apache.http.annotation.Immutable;
|
||||||
|
|
||||||
import org.apache.http.conn.routing.HttpRoute;
|
import org.apache.http.conn.routing.HttpRoute;
|
||||||
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
|
|
||||||
import org.apache.http.params.HttpConnectionParams;
|
import org.apache.http.params.HttpConnectionParams;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
@ -40,6 +39,8 @@ import org.apache.http.params.HttpParams;
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @see ConnManagerPNames
|
* @see ConnManagerPNames
|
||||||
|
*
|
||||||
|
* @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Immutable
|
@Immutable
|
||||||
|
@ -55,9 +56,8 @@ public final class ConnManagerParams implements ConnManagerPNames {
|
||||||
*
|
*
|
||||||
* @return timeout in milliseconds.
|
* @return timeout in milliseconds.
|
||||||
*
|
*
|
||||||
* @deprecated use {@link HttpConnectionParams#getConnectionTimeout(HttpParams)}
|
* @deprecated (4.1) use {@link HttpConnectionParams#getConnectionTimeout(HttpParams)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static long getTimeout(final HttpParams params) {
|
public static long getTimeout(final HttpParams params) {
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
throw new IllegalArgumentException("HTTP parameters may not be null");
|
throw new IllegalArgumentException("HTTP parameters may not be null");
|
||||||
|
@ -72,9 +72,8 @@ public final class ConnManagerParams implements ConnManagerPNames {
|
||||||
*
|
*
|
||||||
* @param timeout the timeout in milliseconds
|
* @param timeout the timeout in milliseconds
|
||||||
*
|
*
|
||||||
* @deprecated use {@link HttpConnectionParams#setConnectionTimeout(HttpParams, int)}
|
* @deprecated (4.1) use {@link HttpConnectionParams#setConnectionTimeout(HttpParams, int)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void setTimeout(final HttpParams params, long timeout) {
|
public static void setTimeout(final HttpParams params, long timeout) {
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
throw new IllegalArgumentException("HTTP parameters may not be null");
|
throw new IllegalArgumentException("HTTP parameters may not be null");
|
||||||
|
@ -97,10 +96,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
|
||||||
* @param params HTTP parameters
|
* @param params HTTP parameters
|
||||||
* @param connPerRoute lookup interface for maximum number of connections allowed
|
* @param connPerRoute lookup interface for maximum number of connections allowed
|
||||||
* per route
|
* per route
|
||||||
*
|
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#setMaxForRoute(org.apache.http.conn.routing.HttpRoute, int)}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void setMaxConnectionsPerRoute(final HttpParams params,
|
public static void setMaxConnectionsPerRoute(final HttpParams params,
|
||||||
final ConnPerRoute connPerRoute) {
|
final ConnPerRoute connPerRoute) {
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
|
@ -116,10 +112,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
|
||||||
* @param params HTTP parameters
|
* @param params HTTP parameters
|
||||||
*
|
*
|
||||||
* @return lookup interface for maximum number of connections allowed per route.
|
* @return lookup interface for maximum number of connections allowed per route.
|
||||||
*
|
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#getMaxForRoute(org.apache.http.conn.routing.HttpRoute)}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static ConnPerRoute getMaxConnectionsPerRoute(final HttpParams params) {
|
public static ConnPerRoute getMaxConnectionsPerRoute(final HttpParams params) {
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
throw new IllegalArgumentException
|
throw new IllegalArgumentException
|
||||||
|
@ -137,10 +130,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
|
||||||
*
|
*
|
||||||
* @param params HTTP parameters
|
* @param params HTTP parameters
|
||||||
* @param maxTotalConnections The maximum number of connections allowed.
|
* @param maxTotalConnections The maximum number of connections allowed.
|
||||||
*
|
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#setMaxTotal(int)}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void setMaxTotalConnections(
|
public static void setMaxTotalConnections(
|
||||||
final HttpParams params,
|
final HttpParams params,
|
||||||
int maxTotalConnections) {
|
int maxTotalConnections) {
|
||||||
|
@ -157,10 +147,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
|
||||||
* @param params HTTP parameters
|
* @param params HTTP parameters
|
||||||
*
|
*
|
||||||
* @return The maximum number of connections allowed.
|
* @return The maximum number of connections allowed.
|
||||||
*
|
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#getMaxTotal()}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getMaxTotalConnections(
|
public static int getMaxTotalConnections(
|
||||||
final HttpParams params) {
|
final HttpParams params) {
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ import org.apache.http.pool.ConnPoolControl;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link ConnPoolControl}
|
* @deprecated (4.2) use {@link ConnPoolControl}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
|
@ -65,10 +65,6 @@ public final class ConnPerRouteBean implements ConnPerRoute {
|
||||||
this(DEFAULT_MAX_CONNECTIONS_PER_ROUTE);
|
this(DEFAULT_MAX_CONNECTIONS_PER_ROUTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #getDefaultMaxPerRoute()} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public int getDefaultMax() {
|
public int getDefaultMax() {
|
||||||
return this.defaultMax;
|
return this.defaultMax;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ import java.net.InetAddress;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated Do not use
|
* @deprecated (4.1) Do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface HostNameResolver {
|
public interface HostNameResolver {
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.net.UnknownHostException;
|
||||||
*
|
*
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
*
|
*
|
||||||
* @deprecated use {@link SchemeLayeredSocketFactory}
|
* @deprecated (4.2) use {@link SchemeLayeredSocketFactory}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface LayeredSchemeSocketFactory extends SchemeSocketFactory {
|
public interface LayeredSchemeSocketFactory extends SchemeSocketFactory {
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.net.UnknownHostException;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link SchemeSocketFactory}
|
* @deprecated (4.1) use {@link SchemeSocketFactory}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface LayeredSocketFactory extends SocketFactory {
|
public interface LayeredSocketFactory extends SocketFactory {
|
||||||
|
|
|
@ -31,6 +31,9 @@ import java.io.IOException;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class LayeredSocketFactoryAdaptor extends SocketFactoryAdaptor implements LayeredSocketFactory {
|
class LayeredSocketFactoryAdaptor extends SocketFactoryAdaptor implements LayeredSocketFactory {
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ import java.net.UnknownHostException;
|
||||||
import org.apache.http.annotation.Immutable;
|
import org.apache.http.annotation.Immutable;
|
||||||
|
|
||||||
import org.apache.http.conn.ConnectTimeoutException;
|
import org.apache.http.conn.ConnectTimeoutException;
|
||||||
|
import org.apache.http.conn.DnsResolver;
|
||||||
import org.apache.http.params.HttpConnectionParams;
|
import org.apache.http.params.HttpConnectionParams;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
@ -67,6 +68,9 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
|
||||||
return new PlainSocketFactory();
|
return new PlainSocketFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) use {@link DnsResolver}
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public PlainSocketFactory(final HostNameResolver nameResolver) {
|
public PlainSocketFactory(final HostNameResolver nameResolver) {
|
||||||
super();
|
super();
|
||||||
|
@ -153,7 +157,7 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)}
|
* @deprecated (4.1) Use {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Socket connectSocket(
|
public Socket connectSocket(
|
||||||
|
|
|
@ -117,7 +117,7 @@ public final class Scheme {
|
||||||
* with this scheme
|
* with this scheme
|
||||||
* @param port the default port for this scheme
|
* @param port the default port for this scheme
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link #Scheme(String, int, SchemeSocketFactory)}
|
* @deprecated (4.1) Use {@link #Scheme(String, int, SchemeSocketFactory)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Scheme(final String name,
|
public Scheme(final String name,
|
||||||
|
@ -166,7 +166,7 @@ public final class Scheme {
|
||||||
*
|
*
|
||||||
* @return the socket factory for this scheme
|
* @return the socket factory for this scheme
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link #getSchemeSocketFactory()}
|
* @deprecated (4.1) Use {@link #getSchemeSocketFactory()}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public final SocketFactory getSocketFactory() {
|
public final SocketFactory getSocketFactory() {
|
||||||
|
|
|
@ -33,6 +33,9 @@ import java.net.UnknownHostException;
|
||||||
|
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class SchemeLayeredSocketFactoryAdaptor extends SchemeSocketFactoryAdaptor
|
class SchemeLayeredSocketFactoryAdaptor extends SchemeSocketFactoryAdaptor
|
||||||
implements SchemeLayeredSocketFactory {
|
implements SchemeLayeredSocketFactory {
|
||||||
|
|
|
@ -35,6 +35,9 @@ import java.net.UnknownHostException;
|
||||||
import org.apache.http.conn.ConnectTimeoutException;
|
import org.apache.http.conn.ConnectTimeoutException;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class SchemeLayeredSocketFactoryAdaptor2 implements SchemeLayeredSocketFactory {
|
class SchemeLayeredSocketFactoryAdaptor2 implements SchemeLayeredSocketFactory {
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@ import java.net.UnknownHostException;
|
||||||
import org.apache.http.conn.ConnectTimeoutException;
|
import org.apache.http.conn.ConnectTimeoutException;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class SchemeSocketFactoryAdaptor implements SchemeSocketFactory {
|
class SchemeSocketFactoryAdaptor implements SchemeSocketFactory {
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.apache.http.params.HttpParams;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link SchemeSocketFactory}
|
* @deprecated (4.1) use {@link SchemeSocketFactory}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface SocketFactory {
|
public interface SocketFactory {
|
||||||
|
|
|
@ -37,6 +37,9 @@ import org.apache.http.conn.ConnectTimeoutException;
|
||||||
import org.apache.http.params.BasicHttpParams;
|
import org.apache.http.params.BasicHttpParams;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class SocketFactoryAdaptor implements SocketFactory {
|
class SocketFactoryAdaptor implements SocketFactory {
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.http.Header;
|
||||||
import org.apache.http.HttpRequest;
|
import org.apache.http.HttpRequest;
|
||||||
import org.apache.http.auth.AuthenticationException;
|
import org.apache.http.auth.AuthenticationException;
|
||||||
import org.apache.http.auth.ChallengeState;
|
import org.apache.http.auth.ChallengeState;
|
||||||
|
import org.apache.http.auth.ContextAwareAuthScheme;
|
||||||
import org.apache.http.auth.Credentials;
|
import org.apache.http.auth.Credentials;
|
||||||
import org.apache.http.auth.AUTH;
|
import org.apache.http.auth.AUTH;
|
||||||
import org.apache.http.auth.InvalidCredentialsException;
|
import org.apache.http.auth.InvalidCredentialsException;
|
||||||
|
@ -119,6 +120,9 @@ public class BasicScheme extends RFC2617Scheme {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Header authenticate(
|
public Header authenticate(
|
||||||
final Credentials credentials, final HttpRequest request) throws AuthenticationException {
|
final Credentials credentials, final HttpRequest request) throws AuthenticationException {
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.apache.http.HttpEntityEnclosingRequest;
|
||||||
import org.apache.http.HttpRequest;
|
import org.apache.http.HttpRequest;
|
||||||
import org.apache.http.auth.AuthenticationException;
|
import org.apache.http.auth.AuthenticationException;
|
||||||
import org.apache.http.auth.ChallengeState;
|
import org.apache.http.auth.ChallengeState;
|
||||||
|
import org.apache.http.auth.ContextAwareAuthScheme;
|
||||||
import org.apache.http.auth.Credentials;
|
import org.apache.http.auth.Credentials;
|
||||||
import org.apache.http.auth.AUTH;
|
import org.apache.http.auth.AUTH;
|
||||||
import org.apache.http.auth.MalformedChallengeException;
|
import org.apache.http.auth.MalformedChallengeException;
|
||||||
|
@ -177,6 +178,9 @@ public class DigestScheme extends RFC2617Scheme {
|
||||||
getParameters().put(name, value);
|
getParameters().put(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Header authenticate(
|
public Header authenticate(
|
||||||
final Credentials credentials, final HttpRequest request) throws AuthenticationException {
|
final Credentials credentials, final HttpRequest request) throws AuthenticationException {
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.http.Header;
|
||||||
import org.apache.http.HttpHost;
|
import org.apache.http.HttpHost;
|
||||||
import org.apache.http.HttpRequest;
|
import org.apache.http.HttpRequest;
|
||||||
import org.apache.http.auth.AuthenticationException;
|
import org.apache.http.auth.AuthenticationException;
|
||||||
|
import org.apache.http.auth.ContextAwareAuthScheme;
|
||||||
import org.apache.http.auth.Credentials;
|
import org.apache.http.auth.Credentials;
|
||||||
import org.apache.http.auth.InvalidCredentialsException;
|
import org.apache.http.auth.InvalidCredentialsException;
|
||||||
import org.apache.http.auth.MalformedChallengeException;
|
import org.apache.http.auth.MalformedChallengeException;
|
||||||
|
@ -45,6 +46,9 @@ import org.ietf.jgss.GSSManager;
|
||||||
import org.ietf.jgss.GSSName;
|
import org.ietf.jgss.GSSName;
|
||||||
import org.ietf.jgss.Oid;
|
import org.ietf.jgss.Oid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 4.2
|
||||||
|
*/
|
||||||
public abstract class GGSSchemeBase extends AuthSchemeBase {
|
public abstract class GGSSchemeBase extends AuthSchemeBase {
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
|
@ -102,6 +106,9 @@ public abstract class GGSSchemeBase extends AuthSchemeBase {
|
||||||
return this.state == State.TOKEN_GENERATED || this.state == State.FAILED;
|
return this.state == State.TOKEN_GENERATED || this.state == State.FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Header authenticate(
|
public Header authenticate(
|
||||||
final Credentials credentials,
|
final Credentials credentials,
|
||||||
|
|
|
@ -43,7 +43,7 @@ import org.ietf.jgss.Oid;
|
||||||
*
|
*
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
*
|
*
|
||||||
* @deprecated use {@link SPNegoScheme} or {@link KerberosScheme}.
|
* @deprecated (4.2) use {@link SPNegoScheme} or {@link KerberosScheme}.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class NegotiateScheme extends GGSSchemeBase {
|
public class NegotiateScheme extends GGSSchemeBase {
|
||||||
|
@ -81,6 +81,12 @@ public class NegotiateScheme extends GGSSchemeBase {
|
||||||
return "Negotiate";
|
return "Negotiate";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Header authenticate(
|
||||||
|
final Credentials credentials,
|
||||||
|
final HttpRequest request) throws AuthenticationException {
|
||||||
|
return authenticate(credentials, request, null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Produces Negotiate authorization Header based on token created by
|
* Produces Negotiate authorization Header based on token created by
|
||||||
* processChallenge.
|
* processChallenge.
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.apache.http.params.HttpParams;
|
||||||
*
|
*
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
*
|
*
|
||||||
* @deprecated
|
* @deprecated (4.2) use {@link SPNegoSchemeFactory} or {@link KerberosSchemeFactory}.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class NegotiateSchemeFactory implements AuthSchemeFactory {
|
public class NegotiateSchemeFactory implements AuthSchemeFactory {
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.io.IOException;
|
||||||
*
|
*
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
*
|
*
|
||||||
* @deprecated subclass {@link KerberosScheme} and override
|
* @deprecated (4.2) subclass {@link KerberosScheme} and override
|
||||||
* {@link KerberosScheme#generateGSSToken(byte[], org.ietf.jgss.Oid, String)}
|
* {@link KerberosScheme#generateGSSToken(byte[], org.ietf.jgss.Oid, String)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -58,7 +58,7 @@ import org.apache.http.util.CharArrayBuffer;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link AuthenticationStrategy}
|
* @deprecated (4.2) use {@link AuthenticationStrategy}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Immutable
|
@Immutable
|
||||||
|
|
|
@ -382,70 +382,66 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return new HttpRequestExecutor();
|
return new HttpRequestExecutor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected ConnectionReuseStrategy createConnectionReuseStrategy() {
|
protected ConnectionReuseStrategy createConnectionReuseStrategy() {
|
||||||
return new DefaultConnectionReuseStrategy();
|
return new DefaultConnectionReuseStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy() {
|
protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy() {
|
||||||
return new DefaultConnectionKeepAliveStrategy();
|
return new DefaultConnectionKeepAliveStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
|
protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
|
||||||
return new DefaultHttpRequestRetryHandler();
|
return new DefaultHttpRequestRetryHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected RedirectHandler createRedirectHandler() {
|
protected RedirectHandler createRedirectHandler() {
|
||||||
return new DefaultRedirectHandler();
|
return new DefaultRedirectHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected AuthenticationStrategy createTargetAuthenticationStrategy() {
|
protected AuthenticationStrategy createTargetAuthenticationStrategy() {
|
||||||
return new TargetAuthenticationStrategy();
|
return new TargetAuthenticationStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected AuthenticationHandler createTargetAuthenticationHandler() {
|
protected AuthenticationHandler createTargetAuthenticationHandler() {
|
||||||
return new DefaultTargetAuthenticationHandler();
|
return new DefaultTargetAuthenticationHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected AuthenticationStrategy createProxyAuthenticationStrategy() {
|
protected AuthenticationStrategy createProxyAuthenticationStrategy() {
|
||||||
return new ProxyAuthenticationStrategy();
|
return new ProxyAuthenticationStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected AuthenticationHandler createProxyAuthenticationHandler() {
|
protected AuthenticationHandler createProxyAuthenticationHandler() {
|
||||||
return new DefaultProxyAuthenticationHandler();
|
return new DefaultProxyAuthenticationHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected CookieStore createCookieStore() {
|
protected CookieStore createCookieStore() {
|
||||||
return new BasicCookieStore();
|
return new BasicCookieStore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected CredentialsProvider createCredentialsProvider() {
|
protected CredentialsProvider createCredentialsProvider() {
|
||||||
return new BasicCredentialsProvider();
|
return new BasicCredentialsProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected HttpRoutePlanner createHttpRoutePlanner() {
|
protected HttpRoutePlanner createHttpRoutePlanner() {
|
||||||
return new DefaultHttpRoutePlanner(getConnectionManager().getSchemeRegistry());
|
return new DefaultHttpRoutePlanner(getConnectionManager().getSchemeRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected UserTokenHandler createUserTokenHandler() {
|
protected UserTokenHandler createUserTokenHandler() {
|
||||||
return new DefaultUserTokenHandler();
|
return new DefaultUserTokenHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// non-javadoc, see interface HttpClient
|
// non-javadoc, see interface HttpClient
|
||||||
public synchronized final HttpParams getParams() {
|
public synchronized final HttpParams getParams() {
|
||||||
if (defaultParams == null) {
|
if (defaultParams == null) {
|
||||||
|
@ -454,7 +450,6 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return defaultParams;
|
return defaultParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces the parameters.
|
* Replaces the parameters.
|
||||||
* The implementation here does not update parameters of dependent objects.
|
* The implementation here does not update parameters of dependent objects.
|
||||||
|
@ -553,18 +548,21 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return retryHandler;
|
return retryHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void setHttpRequestRetryHandler(final HttpRequestRetryHandler handler) {
|
public synchronized void setHttpRequestRetryHandler(final HttpRequestRetryHandler handler) {
|
||||||
this.retryHandler = handler;
|
this.retryHandler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized final RedirectHandler getRedirectHandler() {
|
public synchronized final RedirectHandler getRedirectHandler() {
|
||||||
return createRedirectHandler();
|
return createRedirectHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized void setRedirectHandler(final RedirectHandler handler) {
|
public synchronized void setRedirectHandler(final RedirectHandler handler) {
|
||||||
this.redirectStrategy = new DefaultRedirectStrategyAdaptor(handler);
|
this.redirectStrategy = new DefaultRedirectStrategyAdaptor(handler);
|
||||||
|
@ -587,19 +585,22 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
this.redirectStrategy = strategy;
|
this.redirectStrategy = strategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized final AuthenticationHandler getTargetAuthenticationHandler() {
|
public synchronized final AuthenticationHandler getTargetAuthenticationHandler() {
|
||||||
return createTargetAuthenticationHandler();
|
return createTargetAuthenticationHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized void setTargetAuthenticationHandler(final AuthenticationHandler handler) {
|
public synchronized void setTargetAuthenticationHandler(final AuthenticationHandler handler) {
|
||||||
this.targetAuthStrategy = new AuthenticationStrategyAdaptor(handler);
|
this.targetAuthStrategy = new AuthenticationStrategyAdaptor(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@ -610,7 +611,6 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return targetAuthStrategy;
|
return targetAuthStrategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@ -618,19 +618,22 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
this.targetAuthStrategy = strategy;
|
this.targetAuthStrategy = strategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized final AuthenticationHandler getProxyAuthenticationHandler() {
|
public synchronized final AuthenticationHandler getProxyAuthenticationHandler() {
|
||||||
return createProxyAuthenticationHandler();
|
return createProxyAuthenticationHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized void setProxyAuthenticationHandler(final AuthenticationHandler handler) {
|
public synchronized void setProxyAuthenticationHandler(final AuthenticationHandler handler) {
|
||||||
this.proxyAuthStrategy = new AuthenticationStrategyAdaptor(handler);
|
this.proxyAuthStrategy = new AuthenticationStrategyAdaptor(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@ -641,7 +644,6 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return proxyAuthStrategy;
|
return proxyAuthStrategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@ -649,7 +651,6 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
this.proxyAuthStrategy = strategy;
|
this.proxyAuthStrategy = strategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized final CookieStore getCookieStore() {
|
public synchronized final CookieStore getCookieStore() {
|
||||||
if (cookieStore == null) {
|
if (cookieStore == null) {
|
||||||
cookieStore = createCookieStore();
|
cookieStore = createCookieStore();
|
||||||
|
@ -657,12 +658,10 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return cookieStore;
|
return cookieStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void setCookieStore(final CookieStore cookieStore) {
|
public synchronized void setCookieStore(final CookieStore cookieStore) {
|
||||||
this.cookieStore = cookieStore;
|
this.cookieStore = cookieStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized final CredentialsProvider getCredentialsProvider() {
|
public synchronized final CredentialsProvider getCredentialsProvider() {
|
||||||
if (credsProvider == null) {
|
if (credsProvider == null) {
|
||||||
credsProvider = createCredentialsProvider();
|
credsProvider = createCredentialsProvider();
|
||||||
|
@ -670,12 +669,10 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return credsProvider;
|
return credsProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void setCredentialsProvider(final CredentialsProvider credsProvider) {
|
public synchronized void setCredentialsProvider(final CredentialsProvider credsProvider) {
|
||||||
this.credsProvider = credsProvider;
|
this.credsProvider = credsProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized final HttpRoutePlanner getRoutePlanner() {
|
public synchronized final HttpRoutePlanner getRoutePlanner() {
|
||||||
if (this.routePlanner == null) {
|
if (this.routePlanner == null) {
|
||||||
this.routePlanner = createHttpRoutePlanner();
|
this.routePlanner = createHttpRoutePlanner();
|
||||||
|
@ -683,12 +680,10 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return this.routePlanner;
|
return this.routePlanner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void setRoutePlanner(final HttpRoutePlanner routePlanner) {
|
public synchronized void setRoutePlanner(final HttpRoutePlanner routePlanner) {
|
||||||
this.routePlanner = routePlanner;
|
this.routePlanner = routePlanner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized final UserTokenHandler getUserTokenHandler() {
|
public synchronized final UserTokenHandler getUserTokenHandler() {
|
||||||
if (this.userTokenHandler == null) {
|
if (this.userTokenHandler == null) {
|
||||||
this.userTokenHandler = createUserTokenHandler();
|
this.userTokenHandler = createUserTokenHandler();
|
||||||
|
@ -696,12 +691,10 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return this.userTokenHandler;
|
return this.userTokenHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void setUserTokenHandler(final UserTokenHandler handler) {
|
public synchronized void setUserTokenHandler(final UserTokenHandler handler) {
|
||||||
this.userTokenHandler = handler;
|
this.userTokenHandler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected synchronized final BasicHttpProcessor getHttpProcessor() {
|
protected synchronized final BasicHttpProcessor getHttpProcessor() {
|
||||||
if (mutableProcessor == null) {
|
if (mutableProcessor == null) {
|
||||||
mutableProcessor = createHttpProcessor();
|
mutableProcessor = createHttpProcessor();
|
||||||
|
@ -709,7 +702,6 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return mutableProcessor;
|
return mutableProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private synchronized final HttpProcessor getProtocolProcessor() {
|
private synchronized final HttpProcessor getProtocolProcessor() {
|
||||||
if (protocolProcessor == null) {
|
if (protocolProcessor == null) {
|
||||||
// Get mutable HTTP processor
|
// Get mutable HTTP processor
|
||||||
|
@ -730,69 +722,57 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return protocolProcessor;
|
return protocolProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized int getResponseInterceptorCount() {
|
public synchronized int getResponseInterceptorCount() {
|
||||||
return getHttpProcessor().getResponseInterceptorCount();
|
return getHttpProcessor().getResponseInterceptorCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized HttpResponseInterceptor getResponseInterceptor(int index) {
|
public synchronized HttpResponseInterceptor getResponseInterceptor(int index) {
|
||||||
return getHttpProcessor().getResponseInterceptor(index);
|
return getHttpProcessor().getResponseInterceptor(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized HttpRequestInterceptor getRequestInterceptor(int index) {
|
public synchronized HttpRequestInterceptor getRequestInterceptor(int index) {
|
||||||
return getHttpProcessor().getRequestInterceptor(index);
|
return getHttpProcessor().getRequestInterceptor(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized int getRequestInterceptorCount() {
|
public synchronized int getRequestInterceptorCount() {
|
||||||
return getHttpProcessor().getRequestInterceptorCount();
|
return getHttpProcessor().getRequestInterceptorCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void addResponseInterceptor(final HttpResponseInterceptor itcp) {
|
public synchronized void addResponseInterceptor(final HttpResponseInterceptor itcp) {
|
||||||
getHttpProcessor().addInterceptor(itcp);
|
getHttpProcessor().addInterceptor(itcp);
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void addResponseInterceptor(final HttpResponseInterceptor itcp, int index) {
|
public synchronized void addResponseInterceptor(final HttpResponseInterceptor itcp, int index) {
|
||||||
getHttpProcessor().addInterceptor(itcp, index);
|
getHttpProcessor().addInterceptor(itcp, index);
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void clearResponseInterceptors() {
|
public synchronized void clearResponseInterceptors() {
|
||||||
getHttpProcessor().clearResponseInterceptors();
|
getHttpProcessor().clearResponseInterceptors();
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor> clazz) {
|
public synchronized void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor> clazz) {
|
||||||
getHttpProcessor().removeResponseInterceptorByClass(clazz);
|
getHttpProcessor().removeResponseInterceptorByClass(clazz);
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void addRequestInterceptor(final HttpRequestInterceptor itcp) {
|
public synchronized void addRequestInterceptor(final HttpRequestInterceptor itcp) {
|
||||||
getHttpProcessor().addInterceptor(itcp);
|
getHttpProcessor().addInterceptor(itcp);
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void addRequestInterceptor(final HttpRequestInterceptor itcp, int index) {
|
public synchronized void addRequestInterceptor(final HttpRequestInterceptor itcp, int index) {
|
||||||
getHttpProcessor().addInterceptor(itcp, index);
|
getHttpProcessor().addInterceptor(itcp, index);
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void clearRequestInterceptors() {
|
public synchronized void clearRequestInterceptors() {
|
||||||
getHttpProcessor().clearRequestInterceptors();
|
getHttpProcessor().clearRequestInterceptors();
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized void removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor> clazz) {
|
public synchronized void removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor> clazz) {
|
||||||
getHttpProcessor().removeRequestInterceptorByClass(clazz);
|
getHttpProcessor().removeRequestInterceptorByClass(clazz);
|
||||||
protocolProcessor = null;
|
protocolProcessor = null;
|
||||||
|
@ -804,7 +784,6 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
return execute(request, (HttpContext) null);
|
return execute(request, (HttpContext) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps to {@link HttpClient#execute(HttpHost,HttpRequest,HttpContext)
|
* Maps to {@link HttpClient#execute(HttpHost,HttpRequest,HttpContext)
|
||||||
* execute(target, request, context)}.
|
* execute(target, request, context)}.
|
||||||
|
@ -931,6 +910,9 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected RequestDirector createClientRequestDirector(
|
protected RequestDirector createClientRequestDirector(
|
||||||
final HttpRequestExecutor requestExec,
|
final HttpRequestExecutor requestExec,
|
||||||
|
@ -960,6 +942,9 @@ public abstract class AbstractHttpClient implements HttpClient {
|
||||||
params);
|
params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.2) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected RequestDirector createClientRequestDirector(
|
protected RequestDirector createClientRequestDirector(
|
||||||
final HttpRequestExecutor requestExec,
|
final HttpRequestExecutor requestExec,
|
||||||
|
|
|
@ -53,9 +53,8 @@ import org.apache.http.client.protocol.ClientContext;
|
||||||
import org.apache.http.protocol.HttpContext;
|
import org.apache.http.protocol.HttpContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Immutable
|
@Immutable
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
|
class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
|
||||||
|
@ -64,7 +63,6 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
|
||||||
|
|
||||||
private final AuthenticationHandler handler;
|
private final AuthenticationHandler handler;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public AuthenticationStrategyAdaptor(final AuthenticationHandler handler) {
|
public AuthenticationStrategyAdaptor(final AuthenticationHandler handler) {
|
||||||
super();
|
super();
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
|
|
@ -47,7 +47,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link ProxyAuthenticationStrategy}
|
* @deprecated (4.2) use {@link ProxyAuthenticationStrategy}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Immutable
|
@Immutable
|
||||||
|
|
|
@ -55,7 +55,7 @@ import org.apache.http.protocol.ExecutionContext;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link DefaultRedirectStrategy}.
|
* @deprecated (4.1) use {@link DefaultRedirectStrategy}.
|
||||||
*/
|
*/
|
||||||
@Immutable
|
@Immutable
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -41,16 +41,14 @@ import org.apache.http.client.methods.HttpUriRequest;
|
||||||
import org.apache.http.protocol.HttpContext;
|
import org.apache.http.protocol.HttpContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.1
|
* @deprecated (4.1) do not use
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Immutable
|
@Immutable
|
||||||
@Deprecated
|
@Deprecated
|
||||||
class DefaultRedirectStrategyAdaptor implements RedirectStrategy {
|
class DefaultRedirectStrategyAdaptor implements RedirectStrategy {
|
||||||
|
|
||||||
private final RedirectHandler handler;
|
private final RedirectHandler handler;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public DefaultRedirectStrategyAdaptor(final RedirectHandler handler) {
|
public DefaultRedirectStrategyAdaptor(final RedirectHandler handler) {
|
||||||
super();
|
super();
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
|
|
@ -47,7 +47,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link TargetAuthenticationStrategy}
|
* @deprecated (4.2) use {@link TargetAuthenticationStrategy}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Immutable
|
@Immutable
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class EntityEnclosingRequestWrapper extends RequestWrapper
|
||||||
super(entity);
|
super(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void consumeContent() throws IOException {
|
public void consumeContent() throws IOException {
|
||||||
consumed = true;
|
consumed = true;
|
||||||
|
|
|
@ -67,7 +67,7 @@ import org.apache.http.protocol.HttpContext;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@NotThreadSafe
|
@NotThreadSafe
|
||||||
|
@ -126,9 +126,8 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link #assertValid(OperatedClientConnection)}
|
* @deprecated (4.1) use {@link #assertValid(OperatedClientConnection)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
protected final void assertNotAborted() throws InterruptedIOException {
|
protected final void assertNotAborted() throws InterruptedIOException {
|
||||||
if (isReleased()) {
|
if (isReleased()) {
|
||||||
throw new InterruptedIOException("Connection has been shut down");
|
throw new InterruptedIOException("Connection has been shut down");
|
||||||
|
|
|
@ -53,7 +53,7 @@ import org.apache.http.conn.OperatedClientConnection;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public abstract class AbstractPoolEntry {
|
public abstract class AbstractPoolEntry {
|
||||||
|
|
|
@ -47,7 +47,7 @@ import org.apache.http.conn.OperatedClientConnection;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapter {
|
public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapter {
|
||||||
|
@ -71,6 +71,8 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
|
||||||
* Obtains the pool entry.
|
* Obtains the pool entry.
|
||||||
*
|
*
|
||||||
* @return the pool entry, or <code>null</code> if detached
|
* @return the pool entry, or <code>null</code> if detached
|
||||||
|
*
|
||||||
|
* @deprecated (4.0.1)
|
||||||
*/
|
*/
|
||||||
protected AbstractPoolEntry getPoolEntry() {
|
protected AbstractPoolEntry getPoolEntry() {
|
||||||
return this.poolEntry;
|
return this.poolEntry;
|
||||||
|
@ -91,9 +93,8 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link #assertValid(AbstractPoolEntry)}
|
* @deprecated (4.1) use {@link #assertValid(AbstractPoolEntry)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
protected final void assertAttached() {
|
protected final void assertAttached() {
|
||||||
if (poolEntry == null) {
|
if (poolEntry == null) {
|
||||||
throw new ConnectionShutdownException();
|
throw new ConnectionShutdownException();
|
||||||
|
|
|
@ -45,7 +45,7 @@ import org.apache.http.HttpConnection;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated no longer used
|
* @deprecated (4.1) no longer used
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class IdleConnectionHandler {
|
public class IdleConnectionHandler {
|
||||||
|
|
|
@ -58,7 +58,7 @@ import org.apache.http.params.HttpParams;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link BasicClientConnectionManager}
|
* @deprecated (4.2) use {@link BasicClientConnectionManager}
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -105,9 +105,8 @@ public class SingleClientConnManager implements ClientConnectionManager {
|
||||||
* @param params the parameters for this manager
|
* @param params the parameters for this manager
|
||||||
* @param schreg the scheme registry
|
* @param schreg the scheme registry
|
||||||
*
|
*
|
||||||
* @deprecated use {@link SingleClientConnManager#SingleClientConnManager(SchemeRegistry)}
|
* @deprecated (4.1) use {@link SingleClientConnManager#SingleClientConnManager(SchemeRegistry)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public SingleClientConnManager(HttpParams params,
|
public SingleClientConnManager(HttpParams params,
|
||||||
SchemeRegistry schreg) {
|
SchemeRegistry schreg) {
|
||||||
this(schreg);
|
this(schreg);
|
||||||
|
@ -361,10 +360,6 @@ public class SingleClientConnManager implements ClientConnectionManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated no longer used
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected void revokeConnection() {
|
protected void revokeConnection() {
|
||||||
ConnAdapter conn = managedConn;
|
ConnAdapter conn = managedConn;
|
||||||
if (conn == null)
|
if (conn == null)
|
||||||
|
|
|
@ -141,6 +141,9 @@ public class Wire {
|
||||||
input(new byte[] {(byte) b});
|
input(new byte[] {(byte) b});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void output(final String s)
|
public void output(final String s)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
@ -150,6 +153,9 @@ public class Wire {
|
||||||
output(s.getBytes());
|
output(s.getBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.1) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void input(final String s)
|
public void input(final String s)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
|
@ -54,9 +54,8 @@ import org.apache.http.impl.conn.IdleConnectionHandler;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link org.apache.http.pool.AbstractConnPool}
|
* @deprecated (4.2) use {@link org.apache.http.pool.AbstractConnPool}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public abstract class AbstractConnPool implements RefQueueHandler {
|
public abstract class AbstractConnPool implements RefQueueHandler {
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ import org.apache.http.impl.conn.AbstractPoolEntry;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link org.apache.http.pool.PoolEntry}
|
* @deprecated (4.2) use {@link org.apache.http.pool.PoolEntry}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class BasicPoolEntry extends AbstractPoolEntry {
|
public class BasicPoolEntry extends AbstractPoolEntry {
|
||||||
|
@ -50,10 +50,6 @@ public class BasicPoolEntry extends AbstractPoolEntry {
|
||||||
private long validUntil;
|
private long validUntil;
|
||||||
private long expiry;
|
private long expiry;
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated do not use
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public BasicPoolEntry(ClientConnectionOperator op,
|
public BasicPoolEntry(ClientConnectionOperator op,
|
||||||
HttpRoute route,
|
HttpRoute route,
|
||||||
ReferenceQueue<Object> queue) {
|
ReferenceQueue<Object> queue) {
|
||||||
|
@ -110,7 +106,6 @@ public class BasicPoolEntry extends AbstractPoolEntry {
|
||||||
return super.route;
|
return super.route;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
protected final BasicPoolEntryRef getWeakRef() {
|
protected final BasicPoolEntryRef getWeakRef() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import org.apache.http.conn.routing.HttpRoute;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class BasicPoolEntryRef extends WeakReference<BasicPoolEntry> {
|
public class BasicPoolEntryRef extends WeakReference<BasicPoolEntry> {
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.apache.http.impl.conn.AbstractPooledConnAdapter;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class BasicPooledConnAdapter extends AbstractPooledConnAdapter {
|
public class BasicPooledConnAdapter extends AbstractPooledConnAdapter {
|
||||||
|
|
|
@ -63,7 +63,7 @@ import org.apache.http.params.HttpParams;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link org.apache.http.pool.AbstractConnPool}
|
* @deprecated (4.2) use {@link org.apache.http.pool.AbstractConnPool}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class ConnPoolByRoute extends AbstractConnPool {
|
public class ConnPoolByRoute extends AbstractConnPool {
|
||||||
|
@ -147,9 +147,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
||||||
/**
|
/**
|
||||||
* Creates a new connection pool, managed by route.
|
* Creates a new connection pool, managed by route.
|
||||||
*
|
*
|
||||||
* @deprecated use {@link ConnPoolByRoute#ConnPoolByRoute(ClientConnectionOperator, ConnPerRoute, int)}
|
* @deprecated (4.1) use {@link ConnPoolByRoute#ConnPoolByRoute(ClientConnectionOperator, ConnPerRoute, int)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public ConnPoolByRoute(final ClientConnectionOperator operator, final HttpParams params) {
|
public ConnPoolByRoute(final ClientConnectionOperator operator, final HttpParams params) {
|
||||||
this(operator,
|
this(operator,
|
||||||
ConnManagerParams.getMaxConnectionsPerRoute(params),
|
ConnManagerParams.getMaxConnectionsPerRoute(params),
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.apache.http.conn.ConnectionPoolTimeoutException;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link Future}
|
* @deprecated (4.2) use {@link Future}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface PoolEntryRequest {
|
public interface PoolEntryRequest {
|
||||||
|
|
|
@ -29,7 +29,7 @@ package org.apache.http.impl.conn.tsccm;
|
||||||
import java.lang.ref.Reference;
|
import java.lang.ref.Reference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated do not use
|
* @deprecated (4.0) do not use
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.lang.ref.ReferenceQueue;
|
||||||
* this worker. It will pick up the queued references and pass them
|
* this worker. It will pick up the queued references and pass them
|
||||||
* on to a handler for appropriate processing.
|
* on to a handler for appropriate processing.
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.0) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class RefQueueWorker implements Runnable {
|
public class RefQueueWorker implements Runnable {
|
||||||
|
|
|
@ -46,7 +46,7 @@ import org.apache.http.util.LangUtils;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link org.apache.http.pool.AbstractConnPool}
|
* @deprecated (4.2) use {@link org.apache.http.pool.AbstractConnPool}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class RouteSpecificPool {
|
public class RouteSpecificPool {
|
||||||
|
@ -56,7 +56,6 @@ public class RouteSpecificPool {
|
||||||
/** The route this pool is for. */
|
/** The route this pool is for. */
|
||||||
protected final HttpRoute route; //Immutable
|
protected final HttpRoute route; //Immutable
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
protected final int maxEntries;
|
protected final int maxEntries;
|
||||||
|
|
||||||
/** Connections per route */
|
/** Connections per route */
|
||||||
|
@ -75,11 +74,9 @@ public class RouteSpecificPool {
|
||||||
/** The number of created entries. */
|
/** The number of created entries. */
|
||||||
protected int numEntries;
|
protected int numEntries;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link RouteSpecificPool#RouteSpecificPool(HttpRoute, ConnPerRoute)}
|
* @deprecated (4.1) use {@link RouteSpecificPool#RouteSpecificPool(HttpRoute, ConnPerRoute)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public RouteSpecificPool(HttpRoute route, int maxEntries) {
|
public RouteSpecificPool(HttpRoute route, int maxEntries) {
|
||||||
this.route = route;
|
this.route = route;
|
||||||
this.maxEntries = maxEntries;
|
this.maxEntries = maxEntries;
|
||||||
|
|
|
@ -64,7 +64,7 @@ import org.apache.http.impl.conn.SchemeRegistryFactory;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated use {@link PoolingClientConnectionManager}
|
* @deprecated (4.2) use {@link PoolingClientConnectionManager}
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -75,7 +75,6 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
|
||||||
/** The schemes supported by this connection manager. */
|
/** The schemes supported by this connection manager. */
|
||||||
protected final SchemeRegistry schemeRegistry; // @ThreadSafe
|
protected final SchemeRegistry schemeRegistry; // @ThreadSafe
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
protected final AbstractConnPool connectionPool;
|
protected final AbstractConnPool connectionPool;
|
||||||
|
|
||||||
/** The pool of connections being managed. */
|
/** The pool of connections being managed. */
|
||||||
|
@ -148,9 +147,8 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
|
||||||
* @param params the parameters for this manager.
|
* @param params the parameters for this manager.
|
||||||
* @param schreg the scheme registry.
|
* @param schreg the scheme registry.
|
||||||
*
|
*
|
||||||
* @deprecated use {@link ThreadSafeClientConnManager#ThreadSafeClientConnManager(SchemeRegistry)}
|
* @deprecated (4.1) use {@link ThreadSafeClientConnManager#ThreadSafeClientConnManager(SchemeRegistry)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public ThreadSafeClientConnManager(HttpParams params,
|
public ThreadSafeClientConnManager(HttpParams params,
|
||||||
SchemeRegistry schreg) {
|
SchemeRegistry schreg) {
|
||||||
if (schreg == null) {
|
if (schreg == null) {
|
||||||
|
@ -178,9 +176,8 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
|
||||||
*
|
*
|
||||||
* @return the connection pool to use
|
* @return the connection pool to use
|
||||||
*
|
*
|
||||||
* @deprecated use #createConnectionPool(long, TimeUnit))
|
* @deprecated (4.1) use #createConnectionPool(long, TimeUnit))
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
protected AbstractConnPool createConnectionPool(final HttpParams params) {
|
protected AbstractConnPool createConnectionPool(final HttpParams params) {
|
||||||
return new ConnPoolByRoute(connOperator, params);
|
return new ConnPoolByRoute(connOperator, params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import java.util.concurrent.locks.Condition;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class WaitingThread {
|
public class WaitingThread {
|
||||||
|
|
|
@ -33,7 +33,7 @@ package org.apache.http.impl.conn.tsccm;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*
|
*
|
||||||
* @deprecated do not use
|
* @deprecated (4.2) do not use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class WaitingThreadAborter {
|
public class WaitingThreadAborter {
|
||||||
|
|
|
@ -55,6 +55,9 @@ import org.apache.http.util.CharArrayBuffer;
|
||||||
@NotThreadSafe // superclass is @NotThreadSafe
|
@NotThreadSafe // superclass is @NotThreadSafe
|
||||||
public class BrowserCompatSpec extends CookieSpecBase {
|
public class BrowserCompatSpec extends CookieSpecBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated (4.0) do not use
|
||||||
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected static final String[] DATE_PATTERNS = new String[] {
|
protected static final String[] DATE_PATTERNS = new String[] {
|
||||||
DateUtils.PATTERN_RFC1123,
|
DateUtils.PATTERN_RFC1123,
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class FileBody extends AbstractContentBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link #writeTo(OutputStream)}
|
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void writeTo(final OutputStream out, int mode) throws IOException {
|
public void writeTo(final OutputStream out, int mode) throws IOException {
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class InputStreamBody extends AbstractContentBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link #writeTo(OutputStream)}
|
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void writeTo(final OutputStream out, int mode) throws IOException {
|
public void writeTo(final OutputStream out, int mode) throws IOException {
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class StringBody extends AbstractContentBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use {@link #writeTo(OutputStream)}
|
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void writeTo(final OutputStream out, int mode) throws IOException {
|
public void writeTo(final OutputStream out, int mode) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue