diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java
index a44cd4e9b..f5dfcb512 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java
@@ -147,9 +147,9 @@ public class CacheConfig {
* Returns the current maximum response body size that will be cached.
* @return size in bytes
*
- * @deprecated use {@link #getMaxObjectSize()}
+ * @deprecated (4.2) use {@link #getMaxObjectSize()}
*/
- @Deprecated
+ @Deprecated
public int getMaxObjectSizeBytes() {
return maxObjectSize > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) maxObjectSize;
}
@@ -158,9 +158,9 @@ public class CacheConfig {
* Specifies the maximum response body size that will be eligible for caching.
* @param maxObjectSizeBytes size in bytes
*
- * @deprecated use {@link #setMaxObjectSize(long)}
+ * @deprecated (4.2) use {@link #setMaxObjectSize(long)}
*/
- @Deprecated
+ @Deprecated
public void setMaxObjectSizeBytes(int maxObjectSizeBytes) {
if (maxObjectSizeBytes > Integer.MAX_VALUE) {
this.maxObjectSize = Integer.MAX_VALUE;
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
index 74fec45e8..50e8ce29e 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
@@ -37,6 +37,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.apache.http.Consts;
import org.apache.http.Header;
import org.apache.http.HeaderElement;
import org.apache.http.HttpHost;
@@ -44,7 +45,6 @@ import org.apache.http.HttpRequest;
import org.apache.http.annotation.Immutable;
import org.apache.http.client.cache.HeaderConstants;
import org.apache.http.client.cache.HttpCacheEntry;
-import org.apache.http.protocol.HTTP;
/**
* @since 4.1
@@ -166,10 +166,10 @@ class CacheKeyGenerator {
if (!first) {
buf.append("&");
}
- buf.append(URLEncoder.encode(headerName, HTTP.UTF_8));
+ buf.append(URLEncoder.encode(headerName, Consts.UTF_8.name()));
buf.append("=");
buf.append(URLEncoder.encode(getFullHeaderValue(req.getHeaders(headerName)),
- HTTP.UTF_8));
+ Consts.UTF_8.name()));
first = false;
}
buf.append("}");
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java
index 3efc4eeed..bef4ae4d7 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java
@@ -43,6 +43,7 @@ import org.apache.http.annotation.Immutable;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.cache.HeaderConstants;
import org.apache.http.entity.AbstractHttpEntity;
+import org.apache.http.entity.ContentType;
import org.apache.http.impl.client.RequestWrapper;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicHttpResponse;
@@ -184,7 +185,8 @@ class RequestProtocolCompliance {
private void addContentTypeHeaderIfMissing(HttpEntityEnclosingRequest request) {
if (request.getEntity().getContentType() == null) {
- ((AbstractHttpEntity) request.getEntity()).setContentType(HTTP.OCTET_STREAM_TYPE);
+ ((AbstractHttpEntity) request.getEntity()).setContentType(
+ ContentType.APPLICATION_OCTET_STREAM.getMimeType());
}
}
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
index d1c62b7bc..e8a7cf06f 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
@@ -129,6 +129,8 @@ public class MemcachedHttpCacheStorage implements HttpCacheStorage {
* @param client how to talk to memcached
* @param config apply HTTP cache-related options
* @param serializer ignored
+ *
+ * @deprecated (4.2) do not use
*/
@Deprecated
public MemcachedHttpCacheStorage(MemcachedClientIF client, CacheConfig config,
diff --git a/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java b/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java
index cccb7c4a5..d7820146c 100644
--- a/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java
+++ b/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java
@@ -121,7 +121,7 @@ public interface AuthScheme {
*
* @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
Header authenticate(Credentials credentials, HttpRequest request)
diff --git a/httpclient/src/main/java/org/apache/http/auth/AuthState.java b/httpclient/src/main/java/org/apache/http/auth/AuthState.java
index 071d6742c..925d7f823 100644
--- a/httpclient/src/main/java/org/apache/http/auth/AuthState.java
+++ b/httpclient/src/main/java/org/apache/http/auth/AuthState.java
@@ -157,13 +157,16 @@ public class AuthState {
/**
* Invalidates the authentication state by resetting its parameters.
*
- * @deprecated use {@link #reset()}
+ * @deprecated (4.2) use {@link #reset()}
*/
- @Deprecated
+ @Deprecated
public void invalidate() {
reset();
}
+ /**
+ * @deprecated (4.2) do not use
+ */
@Deprecated
public boolean isValid() {
return this.authScheme != null;
@@ -174,9 +177,9 @@ public class AuthState {
*
* @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) {
if (authScheme == null) {
reset();
@@ -190,7 +193,7 @@ public class AuthState {
*
* @param credentials User credentials
*
- * @deprecated use {@link #update(AuthScheme, Credentials)}
+ * @deprecated (4.2) use {@link #update(AuthScheme, Credentials)}
*/
@Deprecated
public void setCredentials(final Credentials credentials) {
@@ -202,7 +205,7 @@ public class AuthState {
*
* @return actual authentication scope if available, null
list) {
this.context.setAttribute(AUTH_SCHEME_PREF, list);
}
diff --git a/httpclient/src/main/java/org/apache/http/client/protocol/ResponseAuthCache.java b/httpclient/src/main/java/org/apache/http/client/protocol/ResponseAuthCache.java
index 349f72dfc..6696fab1c 100644
--- a/httpclient/src/main/java/org/apache/http/client/protocol/ResponseAuthCache.java
+++ b/httpclient/src/main/java/org/apache/http/client/protocol/ResponseAuthCache.java
@@ -55,10 +55,10 @@ import org.apache.http.protocol.HttpContext;
*
* @since 4.1
*
- * @deprecated use {@link AuthenticationStrategy}
+ * @deprecated (4.2) use {@link AuthenticationStrategy}
*/
@Immutable
-@Deprecated
+@Deprecated
public class ResponseAuthCache implements HttpResponseInterceptor {
private final Log log = LogFactory.getLog(getClass());
diff --git a/httpclient/src/main/java/org/apache/http/conn/BasicManagedEntity.java b/httpclient/src/main/java/org/apache/http/conn/BasicManagedEntity.java
index 893a807cb..3f6975ced 100644
--- a/httpclient/src/main/java/org/apache/http/conn/BasicManagedEntity.java
+++ b/httpclient/src/main/java/org/apache/http/conn/BasicManagedEntity.java
@@ -104,7 +104,9 @@ public class BasicManagedEntity extends HttpEntityWrapper
}
}
- @Deprecated
+ /**
+ * @deprecated (4.1) Use {@link EntityUtils#consume(HttpEntity)}
+ */
@Override
public void consumeContent() throws IOException {
ensureConsumed();
diff --git a/httpclient/src/main/java/org/apache/http/conn/MultihomePlainSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/MultihomePlainSocketFactory.java
index 551477fea..22fa0a745 100644
--- a/httpclient/src/main/java/org/apache/http/conn/MultihomePlainSocketFactory.java
+++ b/httpclient/src/main/java/org/apache/http/conn/MultihomePlainSocketFactory.java
@@ -53,7 +53,7 @@ import org.apache.http.params.HttpParams;
*
* @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.
*/
@Deprecated
diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
index 1be0c6d1b..eac4c5209 100644
--- a/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
+++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
@@ -27,9 +27,7 @@
package org.apache.http.conn.params;
-import org.apache.http.annotation.NotThreadSafe;
-
-import org.apache.http.impl.conn.DefaultResponseParser;
+import org.apache.http.impl.conn.DefaultHttpResponseParser;
import org.apache.http.params.HttpAbstractParamBean;
import org.apache.http.params.HttpParams;
@@ -39,9 +37,10 @@ import org.apache.http.params.HttpParams;
* using Java Beans conventions.
*
* @since 4.0
+ *
+ * @deprecated (4.2) do not use
*/
-@NotThreadSafe
-@Deprecated
+@Deprecated
public class ConnConnectionParamBean extends HttpAbstractParamBean {
public ConnConnectionParamBean (final HttpParams params) {
@@ -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) {
params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, maxStatusLineGarbage);
diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
index f0eaeb3b3..375838b8d 100644
--- a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
+++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
@@ -26,15 +26,14 @@
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.
*
* @since 4.0
- */
-@Deprecated
+ *
+ * @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
+*/
+@Deprecated
public interface ConnManagerPNames {
/**
@@ -43,10 +42,7 @@ public interface ConnManagerPNames {
* {@link org.apache.http.conn.ClientConnectionManager}.
*
* This parameter expects a value of type {@link Long}. - *
- * @deprecated use {@link CoreConnectionPNames#CONNECTION_TIMEOUT} */ - @Deprecated public static final String TIMEOUT = "http.conn-manager.timeout"; /** @@ -56,10 +52,7 @@ public interface ConnManagerPNames { *
* This parameter expects a value of type {@link ConnPerRoute}. *
- * @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"; /** @@ -68,11 +61,7 @@ public interface ConnManagerPNames { * and applies to individual manager instances. *
* This parameter expects a value of type {@link Integer}. - *
- * @deprecated use {@link ThreadSafeClientConnManager#setMaxTotal(int)},
- * {@link ThreadSafeClientConnManager#getMaxTotal()}
*/
- @Deprecated
public static final String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total";
}
diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
index ecd854719..953af4923 100644
--- a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
+++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
@@ -38,9 +38,11 @@ import org.apache.http.params.HttpParams;
* using Java Beans conventions.
*
* @since 4.0
+ *
+ * @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
*/
@NotThreadSafe
-@Deprecated
+@Deprecated
public class ConnManagerParamBean extends HttpAbstractParamBean {
public ConnManagerParamBean (final HttpParams params) {
@@ -51,14 +53,10 @@ public class ConnManagerParamBean extends HttpAbstractParamBean {
params.setLongParameter(ConnManagerPNames.TIMEOUT, timeout);
}
- /** @see ConnManagerPNames#MAX_TOTAL_CONNECTIONS */
- @Deprecated
public void setMaxTotalConnections (final int maxConnections) {
params.setIntParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, maxConnections);
}
- /** @see ConnManagerPNames#MAX_CONNECTIONS_PER_ROUTE */
- @Deprecated
public void setConnectionsPerRoute(final ConnPerRouteBean connPerRoute) {
params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, connPerRoute);
}
diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
index 58eac1940..bcb9a2d62 100644
--- a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
+++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
@@ -29,7 +29,6 @@ package org.apache.http.conn.params;
import org.apache.http.annotation.Immutable;
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.HttpParams;
@@ -40,8 +39,10 @@ import org.apache.http.params.HttpParams;
* @since 4.0
*
* @see ConnManagerPNames
+ *
+ * @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
*/
-@Deprecated
+@Deprecated
@Immutable
public final class ConnManagerParams implements ConnManagerPNames {
@@ -55,9 +56,8 @@ public final class ConnManagerParams implements ConnManagerPNames {
*
* @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) {
if (params == 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
*
- * @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) {
if (params == 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 connPerRoute lookup interface for maximum number of connections allowed
* per route
- *
- * @deprecated use {@link ThreadSafeClientConnManager#setMaxForRoute(org.apache.http.conn.routing.HttpRoute, int)}
*/
- @Deprecated
public static void setMaxConnectionsPerRoute(final HttpParams params,
final ConnPerRoute connPerRoute) {
if (params == null) {
@@ -116,10 +112,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
* @param params HTTP parameters
*
* @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) {
if (params == null) {
throw new IllegalArgumentException
@@ -137,10 +130,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
*
* @param params HTTP parameters
* @param maxTotalConnections The maximum number of connections allowed.
- *
- * @deprecated use {@link ThreadSafeClientConnManager#setMaxTotal(int)}
*/
- @Deprecated
public static void setMaxTotalConnections(
final HttpParams params,
int maxTotalConnections) {
@@ -157,10 +147,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
* @param params HTTP parameters
*
* @return The maximum number of connections allowed.
- *
- * @deprecated use {@link ThreadSafeClientConnManager#getMaxTotal()}
*/
- @Deprecated
public static int getMaxTotalConnections(
final HttpParams params) {
if (params == null) {
diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
index 73476511b..be49a5380 100644
--- a/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
+++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
@@ -42,9 +42,9 @@ import org.apache.http.pool.ConnPoolControl;
*
* @since 4.0
*
- * @deprecated use {@link ConnPoolControl}
+ * @deprecated (4.2) use {@link ConnPoolControl}
*/
-@Deprecated
+@Deprecated
@ThreadSafe
public final class ConnPerRouteBean implements ConnPerRoute {
@@ -65,10 +65,6 @@ public final class ConnPerRouteBean implements ConnPerRoute {
this(DEFAULT_MAX_CONNECTIONS_PER_ROUTE);
}
- /**
- * @deprecated Use {@link #getDefaultMaxPerRoute()} instead
- */
- @Deprecated
public int getDefaultMax() {
return this.defaultMax;
}
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java b/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
index d325f424c..b2f2f88e6 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
@@ -35,9 +35,9 @@ import java.net.InetAddress;
*
* @since 4.0
*
- * @deprecated Do not use
+ * @deprecated (4.1) Do not use
*/
-@Deprecated
+@Deprecated
public interface HostNameResolver {
/**
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSchemeSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSchemeSocketFactory.java
index abedca18f..4a01bd119 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSchemeSocketFactory.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSchemeSocketFactory.java
@@ -36,7 +36,7 @@ import java.net.UnknownHostException;
*
* @since 4.1
*
- * @deprecated use {@link SchemeLayeredSocketFactory}
+ * @deprecated (4.2) use {@link SchemeLayeredSocketFactory}
*/
@Deprecated
public interface LayeredSchemeSocketFactory extends SchemeSocketFactory {
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactory.java
index 3dd75811f..8cc1bc939 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactory.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactory.java
@@ -37,9 +37,9 @@ import java.net.UnknownHostException;
*
* @since 4.0
*
- * @deprecated use {@link SchemeSocketFactory}
+ * @deprecated (4.1) use {@link SchemeSocketFactory}
*/
-@Deprecated
+@Deprecated
public interface LayeredSocketFactory extends SocketFactory {
/**
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactoryAdaptor.java b/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactoryAdaptor.java
index 7843435d8..f76177833 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactoryAdaptor.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/LayeredSocketFactoryAdaptor.java
@@ -31,6 +31,9 @@ import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
+/**
+ * @deprecated (4.1) do not use
+ */
@Deprecated
class LayeredSocketFactoryAdaptor extends SocketFactoryAdaptor implements LayeredSocketFactory {
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
index 2de278e99..72f727946 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
@@ -37,6 +37,7 @@ import java.net.UnknownHostException;
import org.apache.http.annotation.Immutable;
import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.conn.DnsResolver;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
@@ -67,6 +68,9 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
return new PlainSocketFactory();
}
+ /**
+ * @deprecated (4.1) use {@link DnsResolver}
+ */
@Deprecated
public PlainSocketFactory(final HostNameResolver nameResolver) {
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
public Socket connectSocket(
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java b/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java
index 7dbb4176a..c022639c3 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java
@@ -117,9 +117,9 @@ public final class Scheme {
* with 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,
final SocketFactory factory,
final int port) {
@@ -166,7 +166,7 @@ public final class Scheme {
*
* @return the socket factory for this scheme
*
- * @deprecated Use {@link #getSchemeSocketFactory()}
+ * @deprecated (4.1) Use {@link #getSchemeSocketFactory()}
*/
@Deprecated
public final SocketFactory getSocketFactory() {
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor.java
index 39aef843f..38d45e258 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor.java
@@ -33,6 +33,9 @@ import java.net.UnknownHostException;
import org.apache.http.params.HttpParams;
+/**
+ * @deprecated (4.2) do not use
+ */
@Deprecated
class SchemeLayeredSocketFactoryAdaptor extends SchemeSocketFactoryAdaptor
implements SchemeLayeredSocketFactory {
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor2.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor2.java
index 3e2e9fd6e..12c157746 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor2.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeLayeredSocketFactoryAdaptor2.java
@@ -35,7 +35,10 @@ import java.net.UnknownHostException;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.params.HttpParams;
-@Deprecated
+/**
+ * @deprecated (4.2) do not use
+ */
+@Deprecated
class SchemeLayeredSocketFactoryAdaptor2 implements SchemeLayeredSocketFactory {
private final LayeredSchemeSocketFactory factory;
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactoryAdaptor.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactoryAdaptor.java
index 077e664e2..8aeac0fc1 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactoryAdaptor.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactoryAdaptor.java
@@ -36,6 +36,9 @@ import java.net.UnknownHostException;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.params.HttpParams;
+/**
+ * @deprecated (4.1) do not use
+ */
@Deprecated
class SchemeSocketFactoryAdaptor implements SchemeSocketFactory {
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactory.java
index f086a443a..99cbf5030 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactory.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactory.java
@@ -41,7 +41,7 @@ import org.apache.http.params.HttpParams;
*
* @since 4.0
*
- * @deprecated use {@link SchemeSocketFactory}
+ * @deprecated (4.1) use {@link SchemeSocketFactory}
*/
@Deprecated
public interface SocketFactory {
diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactoryAdaptor.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactoryAdaptor.java
index f8f001770..1716189d8 100644
--- a/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactoryAdaptor.java
+++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SocketFactoryAdaptor.java
@@ -37,6 +37,9 @@ import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
+/**
+ * @deprecated (4.1) do not use
+ */
@Deprecated
class SocketFactoryAdaptor implements SocketFactory {
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java b/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java
index e6bd672fe..05349036e 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java
@@ -33,6 +33,7 @@ import org.apache.http.Header;
import org.apache.http.HttpRequest;
import org.apache.http.auth.AuthenticationException;
import org.apache.http.auth.ChallengeState;
+import org.apache.http.auth.ContextAwareAuthScheme;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.AUTH;
import org.apache.http.auth.InvalidCredentialsException;
@@ -119,6 +120,9 @@ public class BasicScheme extends RFC2617Scheme {
return false;
}
+ /**
+ * @deprecated (4.2) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
+ */
@Deprecated
public Header authenticate(
final Credentials credentials, final HttpRequest request) throws AuthenticationException {
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java b/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
index 66bf6ac80..f183cb515 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
@@ -45,6 +45,7 @@ import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpRequest;
import org.apache.http.auth.AuthenticationException;
import org.apache.http.auth.ChallengeState;
+import org.apache.http.auth.ContextAwareAuthScheme;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.AUTH;
import org.apache.http.auth.MalformedChallengeException;
@@ -177,7 +178,10 @@ public class DigestScheme extends RFC2617Scheme {
getParameters().put(name, value);
}
- @Deprecated
+ /**
+ * @deprecated (4.2) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
+ */
+ @Deprecated
public Header authenticate(
final Credentials credentials, final HttpRequest request) throws AuthenticationException {
return authenticate(credentials, request, new BasicHttpContext());
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java b/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java
index 330655bb0..075c0a136 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java
@@ -32,6 +32,7 @@ import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.auth.AuthenticationException;
+import org.apache.http.auth.ContextAwareAuthScheme;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.InvalidCredentialsException;
import org.apache.http.auth.MalformedChallengeException;
@@ -45,6 +46,9 @@ import org.ietf.jgss.GSSManager;
import org.ietf.jgss.GSSName;
import org.ietf.jgss.Oid;
+/**
+ * @since 4.2
+ */
public abstract class GGSSchemeBase extends AuthSchemeBase {
enum State {
@@ -102,7 +106,10 @@ public abstract class GGSSchemeBase extends AuthSchemeBase {
return this.state == State.TOKEN_GENERATED || this.state == State.FAILED;
}
- @Deprecated
+ /**
+ * @deprecated (4.2) Use {@link ContextAwareAuthScheme#authenticate(Credentials, HttpRequest, org.apache.http.protocol.HttpContext)}
+ */
+ @Deprecated
public Header authenticate(
final Credentials credentials,
final HttpRequest request) throws AuthenticationException {
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java b/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java
index 5d3e84605..463e961bf 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateScheme.java
@@ -43,7 +43,7 @@ import org.ietf.jgss.Oid;
*
* @since 4.1
*
- * @deprecated use {@link SPNegoScheme} or {@link KerberosScheme}.
+ * @deprecated (4.2) use {@link SPNegoScheme} or {@link KerberosScheme}.
*/
@Deprecated
public class NegotiateScheme extends GGSSchemeBase {
@@ -81,6 +81,12 @@ public class NegotiateScheme extends GGSSchemeBase {
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
* processChallenge.
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateSchemeFactory.java b/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateSchemeFactory.java
index fb38d83e5..520e14df5 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateSchemeFactory.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/NegotiateSchemeFactory.java
@@ -36,9 +36,9 @@ import org.apache.http.params.HttpParams;
*
* @since 4.1
*
- * @deprecated
+ * @deprecated (4.2) use {@link SPNegoSchemeFactory} or {@link KerberosSchemeFactory}.
*/
-@Deprecated
+@Deprecated
public class NegotiateSchemeFactory implements AuthSchemeFactory {
private final SpnegoTokenGenerator spengoGenerator;
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/SpnegoTokenGenerator.java b/httpclient/src/main/java/org/apache/http/impl/auth/SpnegoTokenGenerator.java
index 0def2f420..154e584f2 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/SpnegoTokenGenerator.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/SpnegoTokenGenerator.java
@@ -36,7 +36,7 @@ import java.io.IOException;
*
* @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)}
*/
@Deprecated
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java b/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java
index 038fdbeb8..2976f4d74 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java
@@ -58,9 +58,9 @@ import org.apache.http.util.CharArrayBuffer;
*
* @since 4.0
*
- * @deprecated use {@link AuthenticationStrategy}
+ * @deprecated (4.2) use {@link AuthenticationStrategy}
*/
-@Deprecated
+@Deprecated
@Immutable
public abstract class AbstractAuthenticationHandler implements AuthenticationHandler {
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java b/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
index 956b097f6..3f3e0bf89 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
@@ -382,70 +382,66 @@ public abstract class AbstractHttpClient implements HttpClient {
return new HttpRequestExecutor();
}
-
protected ConnectionReuseStrategy createConnectionReuseStrategy() {
return new DefaultConnectionReuseStrategy();
}
-
protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy() {
return new DefaultConnectionKeepAliveStrategy();
}
-
protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
return new DefaultHttpRequestRetryHandler();
}
-
- @Deprecated
+ /**
+ * @deprecated (4.1) do not use
+ */
+ @Deprecated
protected RedirectHandler createRedirectHandler() {
return new DefaultRedirectHandler();
}
-
protected AuthenticationStrategy createTargetAuthenticationStrategy() {
return new TargetAuthenticationStrategy();
}
-
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
protected AuthenticationHandler createTargetAuthenticationHandler() {
return new DefaultTargetAuthenticationHandler();
}
-
protected AuthenticationStrategy createProxyAuthenticationStrategy() {
return new ProxyAuthenticationStrategy();
}
-
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
protected AuthenticationHandler createProxyAuthenticationHandler() {
return new DefaultProxyAuthenticationHandler();
}
-
protected CookieStore createCookieStore() {
return new BasicCookieStore();
}
-
protected CredentialsProvider createCredentialsProvider() {
return new BasicCredentialsProvider();
}
-
protected HttpRoutePlanner createHttpRoutePlanner() {
return new DefaultHttpRoutePlanner(getConnectionManager().getSchemeRegistry());
}
-
protected UserTokenHandler createUserTokenHandler() {
return new DefaultUserTokenHandler();
}
-
// non-javadoc, see interface HttpClient
public synchronized final HttpParams getParams() {
if (defaultParams == null) {
@@ -454,7 +450,6 @@ public abstract class AbstractHttpClient implements HttpClient {
return defaultParams;
}
-
/**
* Replaces the parameters.
* The implementation here does not update parameters of dependent objects.
@@ -553,19 +548,22 @@ public abstract class AbstractHttpClient implements HttpClient {
return retryHandler;
}
-
public synchronized void setHttpRequestRetryHandler(final HttpRequestRetryHandler handler) {
this.retryHandler = handler;
}
-
- @Deprecated
+ /**
+ * @deprecated (4.1) do not use
+ */
+ @Deprecated
public synchronized final RedirectHandler getRedirectHandler() {
return createRedirectHandler();
}
-
- @Deprecated
+ /**
+ * @deprecated (4.1) do not use
+ */
+ @Deprecated
public synchronized void setRedirectHandler(final RedirectHandler handler) {
this.redirectStrategy = new DefaultRedirectStrategyAdaptor(handler);
}
@@ -587,19 +585,22 @@ public abstract class AbstractHttpClient implements HttpClient {
this.redirectStrategy = strategy;
}
-
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
public synchronized final AuthenticationHandler getTargetAuthenticationHandler() {
return createTargetAuthenticationHandler();
}
-
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
public synchronized void setTargetAuthenticationHandler(final AuthenticationHandler handler) {
this.targetAuthStrategy = new AuthenticationStrategyAdaptor(handler);
}
-
/**
* @since 4.2
*/
@@ -610,7 +611,6 @@ public abstract class AbstractHttpClient implements HttpClient {
return targetAuthStrategy;
}
-
/**
* @since 4.2
*/
@@ -618,19 +618,22 @@ public abstract class AbstractHttpClient implements HttpClient {
this.targetAuthStrategy = strategy;
}
-
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
public synchronized final AuthenticationHandler getProxyAuthenticationHandler() {
return createProxyAuthenticationHandler();
}
-
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
public synchronized void setProxyAuthenticationHandler(final AuthenticationHandler handler) {
this.proxyAuthStrategy = new AuthenticationStrategyAdaptor(handler);
}
-
/**
* @since 4.2
*/
@@ -641,7 +644,6 @@ public abstract class AbstractHttpClient implements HttpClient {
return proxyAuthStrategy;
}
-
/**
* @since 4.2
*/
@@ -649,7 +651,6 @@ public abstract class AbstractHttpClient implements HttpClient {
this.proxyAuthStrategy = strategy;
}
-
public synchronized final CookieStore getCookieStore() {
if (cookieStore == null) {
cookieStore = createCookieStore();
@@ -657,12 +658,10 @@ public abstract class AbstractHttpClient implements HttpClient {
return cookieStore;
}
-
public synchronized void setCookieStore(final CookieStore cookieStore) {
this.cookieStore = cookieStore;
}
-
public synchronized final CredentialsProvider getCredentialsProvider() {
if (credsProvider == null) {
credsProvider = createCredentialsProvider();
@@ -670,12 +669,10 @@ public abstract class AbstractHttpClient implements HttpClient {
return credsProvider;
}
-
public synchronized void setCredentialsProvider(final CredentialsProvider credsProvider) {
this.credsProvider = credsProvider;
}
-
public synchronized final HttpRoutePlanner getRoutePlanner() {
if (this.routePlanner == null) {
this.routePlanner = createHttpRoutePlanner();
@@ -683,12 +680,10 @@ public abstract class AbstractHttpClient implements HttpClient {
return this.routePlanner;
}
-
public synchronized void setRoutePlanner(final HttpRoutePlanner routePlanner) {
this.routePlanner = routePlanner;
}
-
public synchronized final UserTokenHandler getUserTokenHandler() {
if (this.userTokenHandler == null) {
this.userTokenHandler = createUserTokenHandler();
@@ -696,12 +691,10 @@ public abstract class AbstractHttpClient implements HttpClient {
return this.userTokenHandler;
}
-
public synchronized void setUserTokenHandler(final UserTokenHandler handler) {
this.userTokenHandler = handler;
}
-
protected synchronized final BasicHttpProcessor getHttpProcessor() {
if (mutableProcessor == null) {
mutableProcessor = createHttpProcessor();
@@ -709,7 +702,6 @@ public abstract class AbstractHttpClient implements HttpClient {
return mutableProcessor;
}
-
private synchronized final HttpProcessor getProtocolProcessor() {
if (protocolProcessor == null) {
// Get mutable HTTP processor
@@ -730,69 +722,57 @@ public abstract class AbstractHttpClient implements HttpClient {
return protocolProcessor;
}
-
public synchronized int getResponseInterceptorCount() {
return getHttpProcessor().getResponseInterceptorCount();
}
-
public synchronized HttpResponseInterceptor getResponseInterceptor(int index) {
return getHttpProcessor().getResponseInterceptor(index);
}
-
public synchronized HttpRequestInterceptor getRequestInterceptor(int index) {
return getHttpProcessor().getRequestInterceptor(index);
}
-
public synchronized int getRequestInterceptorCount() {
return getHttpProcessor().getRequestInterceptorCount();
}
-
public synchronized void addResponseInterceptor(final HttpResponseInterceptor itcp) {
getHttpProcessor().addInterceptor(itcp);
protocolProcessor = null;
}
-
public synchronized void addResponseInterceptor(final HttpResponseInterceptor itcp, int index) {
getHttpProcessor().addInterceptor(itcp, index);
protocolProcessor = null;
}
-
public synchronized void clearResponseInterceptors() {
getHttpProcessor().clearResponseInterceptors();
protocolProcessor = null;
}
-
public synchronized void removeResponseInterceptorByClass(Class extends HttpResponseInterceptor> clazz) {
getHttpProcessor().removeResponseInterceptorByClass(clazz);
protocolProcessor = null;
}
-
public synchronized void addRequestInterceptor(final HttpRequestInterceptor itcp) {
getHttpProcessor().addInterceptor(itcp);
protocolProcessor = null;
}
-
public synchronized void addRequestInterceptor(final HttpRequestInterceptor itcp, int index) {
getHttpProcessor().addInterceptor(itcp, index);
protocolProcessor = null;
}
-
public synchronized void clearRequestInterceptors() {
getHttpProcessor().clearRequestInterceptors();
protocolProcessor = null;
}
-
public synchronized void removeRequestInterceptorByClass(Class extends HttpRequestInterceptor> clazz) {
getHttpProcessor().removeRequestInterceptorByClass(clazz);
protocolProcessor = null;
@@ -804,7 +784,6 @@ public abstract class AbstractHttpClient implements HttpClient {
return execute(request, (HttpContext) null);
}
-
/**
* Maps to {@link HttpClient#execute(HttpHost,HttpRequest,HttpContext)
* execute(target, request, context)}.
@@ -931,6 +910,9 @@ public abstract class AbstractHttpClient implements HttpClient {
}
}
+ /**
+ * @deprecated (4.1) do not use
+ */
@Deprecated
protected RequestDirector createClientRequestDirector(
final HttpRequestExecutor requestExec,
@@ -960,7 +942,10 @@ public abstract class AbstractHttpClient implements HttpClient {
params);
}
- @Deprecated
+ /**
+ * @deprecated (4.2) do not use
+ */
+ @Deprecated
protected RequestDirector createClientRequestDirector(
final HttpRequestExecutor requestExec,
final ClientConnectionManager conman,
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java b/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
index 5c4a7768e..c7d53465c 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
@@ -53,9 +53,8 @@ import org.apache.http.client.protocol.ClientContext;
import org.apache.http.protocol.HttpContext;
/**
- * @since 4.2
+ * @deprecated (4.2) do not use
*/
-@SuppressWarnings("deprecation")
@Immutable
@Deprecated
class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
@@ -64,7 +63,6 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
private final AuthenticationHandler handler;
- @Deprecated
public AuthenticationStrategyAdaptor(final AuthenticationHandler handler) {
super();
this.handler = handler;
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java b/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java
index 72f191ad6..345c34795 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java
@@ -47,9 +47,9 @@ import org.apache.http.protocol.HttpContext;
*
* @since 4.0
*
- * @deprecated use {@link ProxyAuthenticationStrategy}
+ * @deprecated (4.2) use {@link ProxyAuthenticationStrategy}
*/
-@Deprecated
+@Deprecated
@Immutable
public class DefaultProxyAuthenticationHandler extends AbstractAuthenticationHandler {
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java b/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
index 850a33b3e..4b1a3f379 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
@@ -55,7 +55,7 @@ import org.apache.http.protocol.ExecutionContext;
*
* @since 4.0
*
- * @deprecated use {@link DefaultRedirectStrategy}.
+ * @deprecated (4.1) use {@link DefaultRedirectStrategy}.
*/
@Immutable
@Deprecated
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategyAdaptor.java b/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategyAdaptor.java
index f7254e8ba..7a592aa48 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategyAdaptor.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategyAdaptor.java
@@ -41,16 +41,14 @@ import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.protocol.HttpContext;
/**
- * @since 4.1
+ * @deprecated (4.1) do not use
*/
-@SuppressWarnings("deprecation")
@Immutable
-@Deprecated
+@Deprecated
class DefaultRedirectStrategyAdaptor implements RedirectStrategy {
private final RedirectHandler handler;
- @Deprecated
public DefaultRedirectStrategyAdaptor(final RedirectHandler handler) {
super();
this.handler = handler;
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java b/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java
index 127253409..17cfc5c1a 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java
@@ -47,7 +47,7 @@ import org.apache.http.protocol.HttpContext;
*
* @since 4.0
*
- * @deprecated use {@link TargetAuthenticationStrategy}
+ * @deprecated (4.2) use {@link TargetAuthenticationStrategy}
*/
@Deprecated
@Immutable
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java b/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
index 3c393c659..c256c10a8 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
@@ -89,7 +89,7 @@ public class EntityEnclosingRequestWrapper extends RequestWrapper
super(entity);
}
- @Deprecated
+ @SuppressWarnings("deprecation")
@Override
public void consumeContent() throws IOException {
consumed = true;
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/AbstractClientConnAdapter.java b/httpclient/src/main/java/org/apache/http/impl/conn/AbstractClientConnAdapter.java
index bf27b9f3e..4d5718b4c 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/AbstractClientConnAdapter.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/AbstractClientConnAdapter.java
@@ -67,7 +67,7 @@ import org.apache.http.protocol.HttpContext;
*
* @since 4.0
*
- * @deprecated do not use
+ * @deprecated (4.2) do not use
*/
@Deprecated
@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 {
if (isReleased()) {
throw new InterruptedIOException("Connection has been shut down");
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java b/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java
index 928c7a65d..8ae374adf 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java
@@ -53,7 +53,7 @@ import org.apache.http.conn.OperatedClientConnection;
*
* @since 4.0
*
- * @deprecated do not use
+ * @deprecated (4.2) do not use
*/
@Deprecated
public abstract class AbstractPoolEntry {
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java b/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java
index 1fa5de72b..db98e8431 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java
@@ -47,7 +47,7 @@ import org.apache.http.conn.OperatedClientConnection;
*
* @since 4.0
*
- * @deprecated do not use
+ * @deprecated (4.2) do not use
*/
@Deprecated
public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapter {
@@ -71,6 +71,8 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
* Obtains the pool entry.
*
* @return the pool entry, or null
if detached
+ *
+ * @deprecated (4.0.1)
*/
protected AbstractPoolEntry getPoolEntry() {
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() {
if (poolEntry == null) {
throw new ConnectionShutdownException();
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java b/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
index aa5813a18..ac5ce514f 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
@@ -45,7 +45,7 @@ import org.apache.http.HttpConnection;
*
* @since 4.0
*
- * @deprecated no longer used
+ * @deprecated (4.1) no longer used
*/
@Deprecated
public class IdleConnectionHandler {
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java b/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java
index db2e94ecc..114064068 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java
@@ -58,10 +58,10 @@ import org.apache.http.params.HttpParams;
*
* @since 4.0
*
- * @deprecated use {@link BasicClientConnectionManager}
+ * @deprecated (4.2) use {@link BasicClientConnectionManager}
*/
@ThreadSafe
-@Deprecated
+@Deprecated
public class SingleClientConnManager implements ClientConnectionManager {
private final Log log = LogFactory.getLog(getClass());
@@ -105,9 +105,8 @@ public class SingleClientConnManager implements ClientConnectionManager {
* @param params the parameters for this manager
* @param schreg the scheme registry
*
- * @deprecated use {@link SingleClientConnManager#SingleClientConnManager(SchemeRegistry)}
+ * @deprecated (4.1) use {@link SingleClientConnManager#SingleClientConnManager(SchemeRegistry)}
*/
- @Deprecated
public SingleClientConnManager(HttpParams params,
SchemeRegistry schreg) {
this(schreg);
@@ -361,10 +360,6 @@ public class SingleClientConnManager implements ClientConnectionManager {
}
}
- /**
- * @deprecated no longer used
- */
- @Deprecated
protected void revokeConnection() {
ConnAdapter conn = managedConn;
if (conn == null)
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java b/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
index bc0b9e29b..11cb49236 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/Wire.java
@@ -141,7 +141,10 @@ public class Wire {
input(new byte[] {(byte) b});
}
- @Deprecated
+ /**
+ * @deprecated (4.1) do not use
+ */
+ @Deprecated
public void output(final String s)
throws IOException {
if (s == null) {
@@ -150,7 +153,10 @@ public class Wire {
output(s.getBytes());
}
- @Deprecated
+ /**
+ * @deprecated (4.1) do not use
+ */
+ @Deprecated
public void input(final String s)
throws IOException {
if (s == null) {
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
index cf08e286f..7d54ba65d 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
@@ -54,9 +54,8 @@ import org.apache.http.impl.conn.IdleConnectionHandler;
*
* @since 4.0
*
- * @deprecated use {@link org.apache.http.pool.AbstractConnPool}
+ * @deprecated (4.2) use {@link org.apache.http.pool.AbstractConnPool}
*/
-
@Deprecated
public abstract class AbstractConnPool implements RefQueueHandler {
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java
index 4d617a1a2..ea270dac1 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java
@@ -39,7 +39,7 @@ import org.apache.http.impl.conn.AbstractPoolEntry;
*
* @since 4.0
*
- * @deprecated use {@link org.apache.http.pool.PoolEntry}
+ * @deprecated (4.2) use {@link org.apache.http.pool.PoolEntry}
*/
@Deprecated
public class BasicPoolEntry extends AbstractPoolEntry {
@@ -50,10 +50,6 @@ public class BasicPoolEntry extends AbstractPoolEntry {
private long validUntil;
private long expiry;
- /**
- * @deprecated do not use
- */
- @Deprecated
public BasicPoolEntry(ClientConnectionOperator op,
HttpRoute route,
ReferenceQueue