Browse Source

DEC-12143 & REPORT-27040 & REPORT-27055 & REPORT-26964 升级httpclient的版本

research/10.0
zhouping 5 years ago
parent
commit
1b22799388
  1. 4
      fine-hsqldb/README.md
  2. 10
      fine-httpcomponents/http-client/README.md
  3. 4
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Content.java
  4. 49
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Executor.java
  5. 2
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalEntityEnclosingHttpRequest.java
  6. 2
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalHttpRequest.java
  7. 59
      fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Request.java
  8. 5
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/CurrentWindowsCredentials.java
  9. 5
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsCredentialsProvider.java
  10. 7
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java
  11. 6
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
  12. 7
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNegotiateSchemeFactory.java
  13. 2
      fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/client/WinHttpClients.java
  14. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/auth/params/AuthParams.java
  15. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/AuthPolicy.java
  16. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/ClientParamBean.java
  17. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/CookiePolicy.java
  18. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/HttpClientParams.java
  19. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ClientContextConfigurer.java
  20. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestProxyAuthentication.java
  21. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestTargetAuthentication.java
  22. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ResponseAuthCache.java
  23. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/utils/JdkIdn.java
  24. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/utils/Punycode.java
  25. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/utils/Rfc3492Idn.java
  26. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicEofSensorWatcher.java
  27. 7
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicManagedEntity.java
  28. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/MultihomePlainSocketFactory.java
  29. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/OperatedClientConnection.java
  30. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnManagerParamBean.java
  31. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnManagerParams.java
  32. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnPerRouteBean.java
  33. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParamBean.java
  34. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParams.java
  35. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/scheme/PlainSocketFactory.java
  36. 7
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLContextBuilder.java
  37. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLContexts.java
  38. 21
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLSocketFactory.java
  39. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/cookie/params/CookieSpecParamBean.java
  40. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/NegotiateScheme.java
  41. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/NegotiateSchemeFactory.java
  42. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/SpnegoTokenGenerator.java
  43. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractAuthenticationHandler.java
  44. 72
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractHttpClient.java
  45. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
  46. 15
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AutoRetryHttpClient.java
  47. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ClientParamsStack.java
  48. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/CloseableHttpResponseProxy.java
  49. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ContentEncodingHttpClient.java
  50. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DecompressingHttpClient.java
  51. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultHttpClient.java
  52. 7
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java
  53. 7
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRedirectHandler.java
  54. 7
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRedirectStrategyAdaptor.java
  55. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRequestDirector.java
  56. 7
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java
  57. 4
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/RoutedRequest.java
  58. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/SystemDefaultHttpClient.java
  59. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/TunnelRefusedException.java
  60. 30
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractClientConnAdapter.java
  61. 12
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractPooledConnAdapter.java
  62. 17
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/BasicClientConnectionManager.java
  63. 15
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnection.java
  64. 10
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnectionOperator.java
  65. 8
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java
  66. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultResponseParser.java
  67. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/HttpConnPool.java
  68. 13
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionInputBuffer.java
  69. 12
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java
  70. 37
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/ManagedClientConnectionImpl.java
  71. 21
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/PoolingClientConnectionManager.java
  72. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java
  73. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SchemeRegistryFactory.java
  74. 18
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SingleClientConnManager.java
  75. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
  76. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/BasicPoolEntryRef.java
  77. 2
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
  78. 1
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java
  79. 19
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
  80. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpec.java
  81. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpecFactory.java
  82. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpec.java
  83. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
  84. 6
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatVersionAttributeHandler.java
  85. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/DateParseException.java
  86. 3
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/DateUtils.java
  87. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/IgnoreSpecFactory.java
  88. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
  89. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/PublicSuffixListParser.java
  90. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2109SpecFactory.java
  91. 5
      fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2965SpecFactory.java
  92. 3
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AUTH.java
  93. 5
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthOption.java
  94. 5
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthSchemeRegistry.java
  95. 5
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthScope.java
  96. 2
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthState.java
  97. 2
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthenticationException.java
  98. 5
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/BasicUserPrincipal.java
  99. 3
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/InvalidCredentialsException.java
  100. 7
      fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/KerberosCredentials.java
  101. Some files were not shown because too many files have changed in this diff Show More

4
fine-hsqldb/README.md

@ -1,2 +1,2 @@
源码地址:https://sourceforge.net/projects/hsqldb/files/hsqldb <br> 源码地址:https://sourceforge.net/projects/hsqldb/files/hsqldb <br>
版本:2.3.4 版本:2.3.4

10
fine-httpcomponents/http-client/README.md

@ -1,2 +1,10 @@
源码地址:https://github.com/apache/httpcomponents-client<br> 源码地址:https://github.com/apache/httpcomponents-client<br>
版本:tag rel/v4.4.1 版本:tag rel/v4.5.3<br>
备注:
以下类的常量未改包名(老third包中也没有改)
com.fr.third.org.apache.http.impl.client.DefaultHttpClient
com.fr.third.org.apache.http.impl.conn.DefaultClientConnection
com.fr.third.org.apache.http.impl.conn.ManagedHttpClientConnectionFactory
com.fr.third.org.apache.http.impl.execchain.MinimalClientExec
com.fr.third.org.apache.http.impl.client.HttpClientBuilder

4
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Content.java

@ -34,7 +34,7 @@ import com.fr.third.org.apache.http.Consts;
import com.fr.third.org.apache.http.entity.ContentType; import com.fr.third.org.apache.http.entity.ContentType;
/** /**
* This class represents arbitrary content of a specfic type that can be consumed * This class represents arbitrary content of a specific type that can be consumed
* multiple times and requires no explicit deallocation. * multiple times and requires no explicit deallocation.
*/ */
public class Content { public class Content {
@ -44,7 +44,7 @@ public class Content {
private final byte[] raw; private final byte[] raw;
private final ContentType type; private final ContentType type;
Content(final byte[] raw, final ContentType type) { public Content(final byte[] raw, final ContentType type) {
super(); super();
this.raw = raw; this.raw = raw;
this.type = type; this.type = type;

49
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Executor.java

@ -44,8 +44,8 @@ import com.fr.third.org.apache.http.client.AuthCache;
import com.fr.third.org.apache.http.client.ClientProtocolException; import com.fr.third.org.apache.http.client.ClientProtocolException;
import com.fr.third.org.apache.http.client.CookieStore; import com.fr.third.org.apache.http.client.CookieStore;
import com.fr.third.org.apache.http.client.CredentialsProvider; import com.fr.third.org.apache.http.client.CredentialsProvider;
import com.fr.third.org.apache.http.client.ResponseHandler;
import com.fr.third.org.apache.http.client.HttpClient; import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.ResponseHandler;
import com.fr.third.org.apache.http.client.protocol.HttpClientContext; import com.fr.third.org.apache.http.client.protocol.HttpClientContext;
import com.fr.third.org.apache.http.config.Registry; import com.fr.third.org.apache.http.config.Registry;
import com.fr.third.org.apache.http.config.RegistryBuilder; import com.fr.third.org.apache.http.config.RegistryBuilder;
@ -98,7 +98,10 @@ public class Executor {
CONNMGR = new PoolingHttpClientConnectionManager(sfr); CONNMGR = new PoolingHttpClientConnectionManager(sfr);
CONNMGR.setDefaultMaxPerRoute(100); CONNMGR.setDefaultMaxPerRoute(100);
CONNMGR.setMaxTotal(200); CONNMGR.setMaxTotal(200);
CLIENT = HttpClientBuilder.create().setConnectionManager(CONNMGR).build(); CONNMGR.setValidateAfterInactivity(1000);
CLIENT = HttpClientBuilder.create()
.setConnectionManager(CONNMGR)
.build();
} }
public static Executor newInstance() { public static Executor newInstance() {
@ -110,19 +113,28 @@ public class Executor {
} }
private final HttpClient httpclient; private final HttpClient httpclient;
private final AuthCache authCache; private volatile AuthCache authCache;
private final CredentialsProvider credentialsProvider; private volatile CredentialsProvider credentialsProvider;
private volatile CookieStore cookieStore; private volatile CookieStore cookieStore;
Executor(final HttpClient httpclient) { Executor(final HttpClient httpclient) {
super(); super();
this.httpclient = httpclient; this.httpclient = httpclient;
this.credentialsProvider = new BasicCredentialsProvider();
this.authCache = new BasicAuthCache(); this.authCache = new BasicAuthCache();
} }
/**
* @since 4.5
*/
public Executor use(final CredentialsProvider credentialsProvider) {
this.credentialsProvider = credentialsProvider;
return this;
}
public Executor auth(final AuthScope authScope, final Credentials creds) { public Executor auth(final AuthScope authScope, final Credentials creds) {
if (this.credentialsProvider == null) {
this.credentialsProvider = new BasicCredentialsProvider();
}
this.credentialsProvider.setCredentials(authScope, creds); this.credentialsProvider.setCredentials(authScope, creds);
return this; return this;
} }
@ -199,17 +211,33 @@ public class Executor {
} }
public Executor clearAuth() { public Executor clearAuth() {
if (this.credentialsProvider != null) {
this.credentialsProvider.clear(); this.credentialsProvider.clear();
}
return this; return this;
} }
/**
* @deprecated (4.5) Use {@link #use(CookieStore)}.
*/
@Deprecated
public Executor cookieStore(final CookieStore cookieStore) { public Executor cookieStore(final CookieStore cookieStore) {
this.cookieStore = cookieStore; this.cookieStore = cookieStore;
return this; return this;
} }
/**
* @since 4.5
*/
public Executor use(final CookieStore cookieStore) {
this.cookieStore = cookieStore;
return this;
}
public Executor clearCookies() { public Executor clearCookies() {
if (this.cookieStore != null) {
this.cookieStore.clear(); this.cookieStore.clear();
}
return this; return this;
} }
@ -224,11 +252,16 @@ public class Executor {
public Response execute( public Response execute(
final Request request) throws ClientProtocolException, IOException { final Request request) throws ClientProtocolException, IOException {
final HttpClientContext localContext = HttpClientContext.create(); final HttpClientContext localContext = HttpClientContext.create();
if (this.credentialsProvider != null) {
localContext.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider); localContext.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider);
}
if (this.authCache != null) {
localContext.setAttribute(HttpClientContext.AUTH_CACHE, this.authCache); localContext.setAttribute(HttpClientContext.AUTH_CACHE, this.authCache);
}
if (this.cookieStore != null) {
localContext.setAttribute(HttpClientContext.COOKIE_STORE, this.cookieStore); localContext.setAttribute(HttpClientContext.COOKIE_STORE, this.cookieStore);
final InternalHttpRequest httprequest = request.prepareRequest(); }
return new Response(this.httpclient.execute(httprequest, localContext)); return new Response(request.internalExecute(this.httpclient, localContext));
} }
/** /**

2
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalEntityEnclosingHttpRequest.java

@ -32,10 +32,8 @@ import java.net.URI;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.HttpEntityEnclosingRequest; import com.fr.third.org.apache.http.HttpEntityEnclosingRequest;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.protocol.HTTP; import com.fr.third.org.apache.http.protocol.HTTP;
@NotThreadSafe
class InternalEntityEnclosingHttpRequest extends InternalHttpRequest implements HttpEntityEnclosingRequest { class InternalEntityEnclosingHttpRequest extends InternalHttpRequest implements HttpEntityEnclosingRequest {
private HttpEntity entity; private HttpEntity entity;

2
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/InternalHttpRequest.java

@ -34,7 +34,6 @@ import java.util.concurrent.atomic.AtomicReference;
import com.fr.third.org.apache.http.HttpVersion; import com.fr.third.org.apache.http.HttpVersion;
import com.fr.third.org.apache.http.ProtocolVersion; import com.fr.third.org.apache.http.ProtocolVersion;
import com.fr.third.org.apache.http.RequestLine; import com.fr.third.org.apache.http.RequestLine;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.client.config.RequestConfig; import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.methods.Configurable; import com.fr.third.org.apache.http.client.methods.Configurable;
import com.fr.third.org.apache.http.client.methods.HttpExecutionAware; import com.fr.third.org.apache.http.client.methods.HttpExecutionAware;
@ -44,7 +43,6 @@ import com.fr.third.org.apache.http.message.AbstractHttpMessage;
import com.fr.third.org.apache.http.message.BasicRequestLine; import com.fr.third.org.apache.http.message.BasicRequestLine;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@NotThreadSafe
class InternalHttpRequest extends AbstractHttpMessage class InternalHttpRequest extends AbstractHttpMessage
implements HttpUriRequest, HttpExecutionAware, Configurable { implements HttpUriRequest, HttpExecutionAware, Configurable {

59
fine-httpcomponents/http-client/fluent-hc/src/main/java/com/fr/third/org/apache/http/client/fluent/Request.java

@ -44,10 +44,13 @@ import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.HttpEntityEnclosingRequest; import com.fr.third.org.apache.http.HttpEntityEnclosingRequest;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpVersion; import com.fr.third.org.apache.http.HttpVersion;
import com.fr.third.org.apache.http.NameValuePair; import com.fr.third.org.apache.http.NameValuePair;
import com.fr.third.org.apache.http.client.ClientProtocolException; import com.fr.third.org.apache.http.client.ClientProtocolException;
import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.config.RequestConfig; import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.methods.Configurable;
import com.fr.third.org.apache.http.client.methods.HttpDelete; import com.fr.third.org.apache.http.client.methods.HttpDelete;
import com.fr.third.org.apache.http.client.methods.HttpGet; import com.fr.third.org.apache.http.client.methods.HttpGet;
import com.fr.third.org.apache.http.client.methods.HttpHead; import com.fr.third.org.apache.http.client.methods.HttpHead;
@ -58,8 +61,8 @@ import com.fr.third.org.apache.http.client.methods.HttpPut;
import com.fr.third.org.apache.http.client.methods.HttpTrace; import com.fr.third.org.apache.http.client.methods.HttpTrace;
import com.fr.third.org.apache.http.client.utils.URLEncodedUtils; import com.fr.third.org.apache.http.client.utils.URLEncodedUtils;
import com.fr.third.org.apache.http.entity.ContentType; import com.fr.third.org.apache.http.entity.ContentType;
import com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import com.fr.third.org.apache.http.protocol.HTTP; import com.fr.third.org.apache.http.protocol.HTTP;
import com.fr.third.org.apache.http.protocol.HttpContext;
public class Request { public class Request {
@ -68,7 +71,10 @@ public class Request {
public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("GMT"); public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("GMT");
private final InternalHttpRequest request; private final InternalHttpRequest request;
private final RequestConfig.Builder configBuilder; private Boolean useExpectContinue;
private Integer socketTmeout;
private Integer connectTimeout;
private HttpHost proxy;
private SimpleDateFormat dateFormatter; private SimpleDateFormat dateFormatter;
@ -139,17 +145,36 @@ public class Request {
Request(final InternalHttpRequest request) { Request(final InternalHttpRequest request) {
super(); super();
this.request = request; this.request = request;
this.configBuilder = RequestConfig.custom();
} }
InternalHttpRequest prepareRequest() { HttpResponse internalExecute(
this.request.setConfig(this.configBuilder.build()); final HttpClient client,
return this.request; final HttpContext localContext) throws ClientProtocolException, IOException {
final RequestConfig.Builder builder;
if (client instanceof Configurable) {
builder = RequestConfig.copy(((Configurable) client).getConfig());
} else {
builder = RequestConfig.custom();
}
if (this.useExpectContinue != null) {
builder.setExpectContinueEnabled(this.useExpectContinue);
}
if (this.socketTmeout != null) {
builder.setSocketTimeout(this.socketTmeout);
}
if (this.connectTimeout != null) {
builder.setConnectTimeout(this.connectTimeout);
}
if (this.proxy != null) {
builder.setProxy(this.proxy);
}
final RequestConfig config = builder.build();
this.request.setConfig(config);
return client.execute(this.request, localContext);
} }
public Response execute() throws ClientProtocolException, IOException { public Response execute() throws ClientProtocolException, IOException {
this.request.setConfig(this.configBuilder.build()); return new Response(internalExecute(Executor.CLIENT, null));
return new Response(Executor.CLIENT.execute(this.request));
} }
public void abort() throws UnsupportedOperationException { public void abort() throws UnsupportedOperationException {
@ -268,7 +293,7 @@ public class Request {
} }
public Request useExpectContinue() { public Request useExpectContinue() {
this.configBuilder.setExpectContinueEnabled(true); this.useExpectContinue = Boolean.TRUE;
return this; return this;
} }
@ -280,29 +305,29 @@ public class Request {
//// HTTP connection parameter operations //// HTTP connection parameter operations
public Request socketTimeout(final int timeout) { public Request socketTimeout(final int timeout) {
this.configBuilder.setSocketTimeout(timeout); this.socketTmeout = timeout;
return this; return this;
} }
public Request connectTimeout(final int timeout) { public Request connectTimeout(final int timeout) {
this.configBuilder.setConnectTimeout(timeout); this.connectTimeout = timeout;
return this; return this;
} }
/** /**
* @deprecated (4.4) Use {@link * This method has no effect. Do not use.
* PoolingHttpClientConnectionManager#setValidateAfterInactivity(int)} *
* @deprecated (4.4)
*/ */
@Deprecated @Deprecated
public Request staleConnectionCheck(final boolean b) { public Request staleConnectionCheck(final boolean b) {
this.configBuilder.setStaleConnectionCheckEnabled(b);
return this; return this;
} }
//// HTTP connection route operations //// HTTP connection route operations
public Request viaProxy(final HttpHost proxy) { public Request viaProxy(final HttpHost proxy) {
this.configBuilder.setProxy(proxy); this.proxy = proxy;
return this; return this;
} }
@ -310,7 +335,7 @@ public class Request {
* @since 4.4 * @since 4.4
*/ */
public Request viaProxy(final String proxy) { public Request viaProxy(final String proxy) {
this.configBuilder.setProxy(HttpHost.create(proxy)); this.proxy = HttpHost.create(proxy);
return this; return this;
} }
@ -332,7 +357,7 @@ public class Request {
paramList.add(param); paramList.add(param);
} }
final ContentType contentType = ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset); final ContentType contentType = ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset);
final String s = URLEncodedUtils.format(paramList, charset != null ? charset.name() : null); final String s = URLEncodedUtils.format(paramList, charset);
return bodyString(s, contentType); return bodyString(s, contentType);
} }

5
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/CurrentWindowsCredentials.java

@ -30,7 +30,8 @@ package com.fr.third.org.apache.http.impl.auth.win;
import java.io.Serializable; import java.io.Serializable;
import java.security.Principal; import java.security.Principal;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.Credentials; import com.fr.third.org.apache.http.auth.Credentials;
import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT; import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT;
@ -44,7 +45,7 @@ import com.sun.jna.platform.win32.Secur32Util;
* *
* @since 4.4 * @since 4.4
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public final class CurrentWindowsCredentials implements Credentials, Serializable, Principal { public final class CurrentWindowsCredentials implements Credentials, Serializable, Principal {
private static final long serialVersionUID = 4361166468529298169L; private static final long serialVersionUID = 4361166468529298169L;

5
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsCredentialsProvider.java

@ -26,7 +26,8 @@
*/ */
package com.fr.third.org.apache.http.impl.auth.win; package com.fr.third.org.apache.http.impl.auth.win;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthScope; import com.fr.third.org.apache.http.auth.AuthScope;
import com.fr.third.org.apache.http.auth.Credentials; import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.client.CredentialsProvider; import com.fr.third.org.apache.http.client.CredentialsProvider;
@ -43,7 +44,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.4 * @since 4.4
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
public class WindowsCredentialsProvider implements CredentialsProvider { public class WindowsCredentialsProvider implements CredentialsProvider {
private final CredentialsProvider provider; private final CredentialsProvider provider;

7
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNTLMSchemeFactory.java

@ -27,7 +27,8 @@
package com.fr.third.org.apache.http.impl.auth.win; package com.fr.third.org.apache.http.impl.auth.win;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider; import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.client.config.AuthSchemes; import com.fr.third.org.apache.http.client.config.AuthSchemes;
@ -42,10 +43,10 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.4 * @since 4.4
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class WindowsNTLMSchemeFactory implements AuthSchemeProvider { public class WindowsNTLMSchemeFactory implements AuthSchemeProvider {
private String servicePrincipalName; private final String servicePrincipalName;
public WindowsNTLMSchemeFactory(final String servicePrincipalName) { public WindowsNTLMSchemeFactory(final String servicePrincipalName) {
super(); super();

6
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java

@ -32,7 +32,6 @@ import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.AuthenticationException; import com.fr.third.org.apache.http.auth.AuthenticationException;
import com.fr.third.org.apache.http.auth.Credentials; import com.fr.third.org.apache.http.auth.Credentials;
@ -67,7 +66,6 @@ import com.sun.jna.ptr.IntByReference;
* *
* @since 4.4 * @since 4.4
*/ */
@NotThreadSafe
public class WindowsNegotiateScheme extends AuthSchemeBase { public class WindowsNegotiateScheme extends AuthSchemeBase {
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());
@ -188,7 +186,7 @@ public class WindowsNegotiateScheme extends AuthSchemeBase {
final String targetName = getServicePrincipalName(context); final String targetName = getServicePrincipalName(context);
response = getToken(null, null, targetName); response = getToken(null, null, targetName);
} catch (RuntimeException ex) { } catch (final RuntimeException ex) {
failAuthCleanup(); failAuthCleanup();
if (ex instanceof Win32Exception) { if (ex instanceof Win32Exception) {
throw new AuthenticationException("Authentication Failed", ex); throw new AuthenticationException("Authentication Failed", ex);
@ -206,7 +204,7 @@ public class WindowsNegotiateScheme extends AuthSchemeBase {
Sspi.SECBUFFER_TOKEN, continueTokenBytes); Sspi.SECBUFFER_TOKEN, continueTokenBytes);
final String targetName = getServicePrincipalName(context); final String targetName = getServicePrincipalName(context);
response = getToken(this.sspiContext, continueTokenBuffer, targetName); response = getToken(this.sspiContext, continueTokenBuffer, targetName);
} catch (RuntimeException ex) { } catch (final RuntimeException ex) {
failAuthCleanup(); failAuthCleanup();
if (ex instanceof Win32Exception) { if (ex instanceof Win32Exception) {
throw new AuthenticationException("Authentication Failed", ex); throw new AuthenticationException("Authentication Failed", ex);

7
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/auth/win/WindowsNegotiateSchemeFactory.java

@ -27,7 +27,8 @@
package com.fr.third.org.apache.http.impl.auth.win; package com.fr.third.org.apache.http.impl.auth.win;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider; import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.client.config.AuthSchemes; import com.fr.third.org.apache.http.client.config.AuthSchemes;
@ -42,10 +43,10 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.4 * @since 4.4
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class WindowsNegotiateSchemeFactory implements AuthSchemeProvider { public class WindowsNegotiateSchemeFactory implements AuthSchemeProvider {
private String servicePrincipalName; private final String servicePrincipalName;
public WindowsNegotiateSchemeFactory(final String servicePrincipalName) { public WindowsNegotiateSchemeFactory(final String servicePrincipalName) {
super(); super();

2
fine-httpcomponents/http-client/httpclient-win/src/main/java/com/fr/third/org/apache/http/impl/client/WinHttpClients.java

@ -62,7 +62,7 @@ public class WinHttpClients {
if (os != null && os.contains("windows")) { if (os != null && os.contains("windows")) {
try { try {
return Sspi.MAX_TOKEN_SIZE > 0; return Sspi.MAX_TOKEN_SIZE > 0;
} catch (Exception ignore) { // Likely ClassNotFound } catch (final Exception ignore) { // Likely ClassNotFound
return false; return false;
} }
} }

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/auth/params/AuthParams.java

@ -27,7 +27,8 @@
package com.fr.third.org.apache.http.auth.params; package com.fr.third.org.apache.http.auth.params;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthSchemeProvider; import com.fr.third.org.apache.http.auth.AuthSchemeProvider;
import com.fr.third.org.apache.http.auth.Credentials; import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.auth.params.AuthPNames; import com.fr.third.org.apache.http.auth.params.AuthPNames;
@ -46,7 +47,7 @@ import com.fr.third.org.apache.http.util.Args;
* and constructor parameters of * and constructor parameters of
* {@link AuthSchemeProvider}s. * {@link AuthSchemeProvider}s.
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public final class AuthParams { public final class AuthParams {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/AuthPolicy.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.client.params; package com.fr.third.org.apache.http.client.params;
import com.fr.third.org.apache.http.annotation.Immutable;
import com.fr.third.org.apache.http.client.config.AuthSchemes; import com.fr.third.org.apache.http.client.config.AuthSchemes;
/** /**
@ -38,7 +37,6 @@ import com.fr.third.org.apache.http.client.config.AuthSchemes;
* @deprecated (4.3) use {@link AuthSchemes}. * @deprecated (4.3) use {@link AuthSchemes}.
*/ */
@Deprecated @Deprecated
@Immutable
public final class AuthPolicy { public final class AuthPolicy {
private AuthPolicy() { private AuthPolicy() {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/ClientParamBean.java

@ -31,7 +31,6 @@ import java.util.Collection;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.client.config.RequestConfig; import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.params.ClientPNames; import com.fr.third.org.apache.http.client.params.ClientPNames;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
@ -47,7 +46,6 @@ import com.fr.third.org.apache.http.params.HttpParams;
* @deprecated (4.3) use {@link RequestConfig}. * @deprecated (4.3) use {@link RequestConfig}.
*/ */
@Deprecated @Deprecated
@NotThreadSafe
public class ClientParamBean extends HttpAbstractParamBean { public class ClientParamBean extends HttpAbstractParamBean {
public ClientParamBean (final HttpParams params) { public ClientParamBean (final HttpParams params) {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/CookiePolicy.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.client.params; package com.fr.third.org.apache.http.client.params;
import com.fr.third.org.apache.http.annotation.Immutable;
import com.fr.third.org.apache.http.client.config.CookieSpecs; import com.fr.third.org.apache.http.client.config.CookieSpecs;
/** /**
@ -38,7 +37,6 @@ import com.fr.third.org.apache.http.client.config.CookieSpecs;
* @deprecated (4.3) use {@link CookieSpecs}. * @deprecated (4.3) use {@link CookieSpecs}.
*/ */
@Deprecated @Deprecated
@Immutable
public final class CookiePolicy { public final class CookiePolicy {
/** /**

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/params/HttpClientParams.java

@ -26,7 +26,6 @@
*/ */
package com.fr.third.org.apache.http.client.params; package com.fr.third.org.apache.http.client.params;
import com.fr.third.org.apache.http.annotation.Immutable;
import com.fr.third.org.apache.http.client.config.RequestConfig; import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.params.HttpConnectionParams; import com.fr.third.org.apache.http.params.HttpConnectionParams;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -40,7 +39,6 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.3) use {@link RequestConfig} * @deprecated (4.3) use {@link RequestConfig}
*/ */
@Deprecated @Deprecated
@Immutable
public class HttpClientParams { public class HttpClientParams {
private HttpClientParams() { private HttpClientParams() {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ClientContextConfigurer.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.client.protocol; package com.fr.third.org.apache.http.client.protocol;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.auth.AuthSchemeRegistry; import com.fr.third.org.apache.http.auth.AuthSchemeRegistry;
import com.fr.third.org.apache.http.client.CookieStore; import com.fr.third.org.apache.http.client.CookieStore;
import com.fr.third.org.apache.http.client.CredentialsProvider; import com.fr.third.org.apache.http.client.CredentialsProvider;
@ -42,7 +41,6 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @deprecated (4.3) use {@link HttpClientContext} * @deprecated (4.3) use {@link HttpClientContext}
*/ */
@NotThreadSafe
@Deprecated @Deprecated
public class ClientContextConfigurer implements ClientContext { public class ClientContextConfigurer implements ClientContext {

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestProxyAuthentication.java

@ -31,7 +31,8 @@ import java.io.IOException;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.AuthState; import com.fr.third.org.apache.http.auth.AuthState;
import com.fr.third.org.apache.http.conn.HttpRoutedConnection; import com.fr.third.org.apache.http.conn.HttpRoutedConnection;
@ -50,13 +51,14 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.3) use {@link HttpAuthenticator}. * @deprecated (4.3) use {@link HttpAuthenticator}.
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class RequestProxyAuthentication extends RequestAuthenticationBase { public class RequestProxyAuthentication extends RequestAuthenticationBase {
public RequestProxyAuthentication() { public RequestProxyAuthentication() {
super(); super();
} }
@Override
public void process(final HttpRequest request, final HttpContext context) public void process(final HttpRequest request, final HttpContext context)
throws HttpException, IOException { throws HttpException, IOException {
Args.notNull(request, "HTTP request"); Args.notNull(request, "HTTP request");

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/RequestTargetAuthentication.java

@ -31,7 +31,8 @@ import java.io.IOException;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.AuthState; import com.fr.third.org.apache.http.auth.AuthState;
import com.fr.third.org.apache.http.impl.auth.HttpAuthenticator; import com.fr.third.org.apache.http.impl.auth.HttpAuthenticator;
@ -47,13 +48,14 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.3) use {@link HttpAuthenticator}. * @deprecated (4.3) use {@link HttpAuthenticator}.
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class RequestTargetAuthentication extends RequestAuthenticationBase { public class RequestTargetAuthentication extends RequestAuthenticationBase {
public RequestTargetAuthentication() { public RequestTargetAuthentication() {
super(); super();
} }
@Override
public void process(final HttpRequest request, final HttpContext context) public void process(final HttpRequest request, final HttpContext context)
throws HttpException, IOException { throws HttpException, IOException {
Args.notNull(request, "HTTP request"); Args.notNull(request, "HTTP request");

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/protocol/ResponseAuthCache.java

@ -36,7 +36,8 @@ import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpResponseInterceptor; import com.fr.third.org.apache.http.HttpResponseInterceptor;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthState; import com.fr.third.org.apache.http.auth.AuthState;
import com.fr.third.org.apache.http.client.AuthCache; import com.fr.third.org.apache.http.client.AuthCache;
@ -58,7 +59,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @deprecated (4.2) use {@link AuthenticationStrategy} * @deprecated (4.2) use {@link AuthenticationStrategy}
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class ResponseAuthCache implements HttpResponseInterceptor { public class ResponseAuthCache implements HttpResponseInterceptor {
@ -68,6 +69,7 @@ public class ResponseAuthCache implements HttpResponseInterceptor {
super(); super();
} }
@Override
public void process(final HttpResponse response, final HttpContext context) public void process(final HttpResponse response, final HttpContext context)
throws HttpException, IOException { throws HttpException, IOException {
Args.notNull(response, "HTTP request"); Args.notNull(response, "HTTP request");

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/utils/JdkIdn.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.client.utils;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
/** /**
* Uses the java.net.IDN class through reflection. * Uses the java.net.IDN class through reflection.
@ -38,7 +39,7 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class JdkIdn implements Idn { public class JdkIdn implements Idn {
private final Method toUnicode; private final Method toUnicode;

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/utils/Punycode.java

@ -26,7 +26,8 @@
*/ */
package com.fr.third.org.apache.http.client.utils; package com.fr.third.org.apache.http.client.utils;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
/** /**
* Facade that provides conversion between Unicode and Punycode domain names. * Facade that provides conversion between Unicode and Punycode domain names.
@ -36,7 +37,7 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class Punycode { public class Punycode {
private static final Idn impl; private static final Idn impl;

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/client/utils/Rfc3492Idn.java

@ -28,7 +28,8 @@ package com.fr.third.org.apache.http.client.utils;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
/** /**
* Implementation from pseudo code in RFC 3492. * Implementation from pseudo code in RFC 3492.
@ -37,7 +38,7 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class Rfc3492Idn implements Idn { public class Rfc3492Idn implements Idn {
private static final int base = 36; private static final int base = 36;

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicEofSensorWatcher.java

@ -29,7 +29,6 @@ package com.fr.third.org.apache.http.conn;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.EofSensorWatcher; import com.fr.third.org.apache.http.conn.EofSensorWatcher;
import com.fr.third.org.apache.http.conn.ManagedClientConnection; import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
@ -43,7 +42,6 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.3) do not use. * @deprecated (4.3) do not use.
*/ */
@Deprecated @Deprecated
@NotThreadSafe
public class BasicEofSensorWatcher implements EofSensorWatcher { public class BasicEofSensorWatcher implements EofSensorWatcher {
/** The connection to auto-release. */ /** The connection to auto-release. */
@ -65,6 +63,7 @@ public class BasicEofSensorWatcher implements EofSensorWatcher {
attemptReuse = reuse; attemptReuse = reuse;
} }
@Override
public boolean eofDetected(final InputStream wrapped) public boolean eofDetected(final InputStream wrapped)
throws IOException { throws IOException {
@ -81,6 +80,7 @@ public class BasicEofSensorWatcher implements EofSensorWatcher {
return false; return false;
} }
@Override
public boolean streamClosed(final InputStream wrapped) public boolean streamClosed(final InputStream wrapped)
throws IOException { throws IOException {
@ -97,6 +97,7 @@ public class BasicEofSensorWatcher implements EofSensorWatcher {
return false; return false;
} }
@Override
public boolean streamAbort(final InputStream wrapped) public boolean streamAbort(final InputStream wrapped)
throws IOException { throws IOException {

7
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/BasicManagedEntity.java

@ -32,7 +32,6 @@ import java.io.OutputStream;
import java.net.SocketException; import java.net.SocketException;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.ConnectionReleaseTrigger; import com.fr.third.org.apache.http.conn.ConnectionReleaseTrigger;
import com.fr.third.org.apache.http.conn.EofSensorInputStream; import com.fr.third.org.apache.http.conn.EofSensorInputStream;
import com.fr.third.org.apache.http.conn.EofSensorWatcher; import com.fr.third.org.apache.http.conn.EofSensorWatcher;
@ -52,7 +51,6 @@ import com.fr.third.org.apache.http.util.EntityUtils;
* @deprecated (4.3) do not use. * @deprecated (4.3) do not use.
*/ */
@Deprecated @Deprecated
@NotThreadSafe
public class BasicManagedEntity extends HttpEntityWrapper public class BasicManagedEntity extends HttpEntityWrapper
implements ConnectionReleaseTrigger, EofSensorWatcher { implements ConnectionReleaseTrigger, EofSensorWatcher {
@ -124,10 +122,12 @@ public class BasicManagedEntity extends HttpEntityWrapper
ensureConsumed(); ensureConsumed();
} }
@Override
public void releaseConnection() throws IOException { public void releaseConnection() throws IOException {
ensureConsumed(); ensureConsumed();
} }
@Override
public void abortConnection() throws IOException { public void abortConnection() throws IOException {
if (managedConn != null) { if (managedConn != null) {
@ -139,6 +139,7 @@ public class BasicManagedEntity extends HttpEntityWrapper
} }
} }
@Override
public boolean eofDetected(final InputStream wrapped) throws IOException { public boolean eofDetected(final InputStream wrapped) throws IOException {
try { try {
if (managedConn != null) { if (managedConn != null) {
@ -157,6 +158,7 @@ public class BasicManagedEntity extends HttpEntityWrapper
return false; return false;
} }
@Override
public boolean streamClosed(final InputStream wrapped) throws IOException { public boolean streamClosed(final InputStream wrapped) throws IOException {
try { try {
if (managedConn != null) { if (managedConn != null) {
@ -182,6 +184,7 @@ public class BasicManagedEntity extends HttpEntityWrapper
return false; return false;
} }
@Override
public boolean streamAbort(final InputStream wrapped) throws IOException { public boolean streamAbort(final InputStream wrapped) throws IOException {
if (managedConn != null) { if (managedConn != null) {
managedConn.abortConnection(); managedConn.abortConnection();

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/MultihomePlainSocketFactory.java

@ -37,7 +37,8 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.scheme.SchemeSocketFactory; import com.fr.third.org.apache.http.conn.scheme.SchemeSocketFactory;
import com.fr.third.org.apache.http.conn.scheme.SocketFactory; import com.fr.third.org.apache.http.conn.scheme.SocketFactory;
import com.fr.third.org.apache.http.params.HttpConnectionParams; import com.fr.third.org.apache.http.params.HttpConnectionParams;
@ -58,7 +59,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* {@link SchemeSocketFactory} interface. * {@link SchemeSocketFactory} interface.
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public final class MultihomePlainSocketFactory implements SocketFactory { public final class MultihomePlainSocketFactory implements SocketFactory {
/** /**
@ -83,7 +84,8 @@ public final class MultihomePlainSocketFactory implements SocketFactory {
} }
// non-javadoc, see interface org.apache.http.conn.SocketFactory // non-javadoc, see interface com.fr.third.org.apache.http.conn.SocketFactory
@Override
public Socket createSocket() { public Socket createSocket() {
return new Socket(); return new Socket();
} }
@ -103,6 +105,7 @@ public final class MultihomePlainSocketFactory implements SocketFactory {
* @throws IOException if an error occurs during the connection * @throws IOException if an error occurs during the connection
* @throws SocketTimeoutException if timeout expires before connecting * @throws SocketTimeoutException if timeout expires before connecting
*/ */
@Override
public Socket connectSocket(final Socket socket, final String host, final int port, public Socket connectSocket(final Socket socket, final String host, final int port,
final InetAddress localAddress, final int localPort, final InetAddress localAddress, final int localPort,
final HttpParams params) final HttpParams params)
@ -160,6 +163,7 @@ public final class MultihomePlainSocketFactory implements SocketFactory {
* *
* @throws IllegalArgumentException if the argument is invalid * @throws IllegalArgumentException if the argument is invalid
*/ */
@Override
public final boolean isSecure(final Socket sock) public final boolean isSecure(final Socket sock)
throws IllegalArgumentException { throws IllegalArgumentException {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/OperatedClientConnection.java

@ -30,8 +30,8 @@ package com.fr.third.org.apache.http.conn;
import java.io.IOException; import java.io.IOException;
import java.net.Socket; import java.net.Socket;
import com.fr.third.org.apache.http.HttpConnection;
import com.fr.third.org.apache.http.HttpClientConnection; import com.fr.third.org.apache.http.HttpClientConnection;
import com.fr.third.org.apache.http.HttpConnection;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpInetConnection; import com.fr.third.org.apache.http.HttpInetConnection;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnManagerParamBean.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.conn.params; package com.fr.third.org.apache.http.conn.params;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -40,7 +39,6 @@ import com.fr.third.org.apache.http.params.HttpParams;
* *
* @deprecated (4.1) use configuration methods of the specific connection manager implementation. * @deprecated (4.1) use configuration methods of the specific connection manager implementation.
*/ */
@NotThreadSafe
@Deprecated @Deprecated
public class ConnManagerParamBean extends HttpAbstractParamBean { public class ConnManagerParamBean extends HttpAbstractParamBean {

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnManagerParams.java

@ -26,7 +26,8 @@
*/ */
package com.fr.third.org.apache.http.conn.params; package com.fr.third.org.apache.http.conn.params;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ManagedClientConnection; import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.params.HttpConnectionParams; import com.fr.third.org.apache.http.params.HttpConnectionParams;
@ -45,7 +46,7 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.1) use configuration methods of the specific connection manager implementation. * @deprecated (4.1) use configuration methods of the specific connection manager implementation.
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public final class ConnManagerParams implements ConnManagerPNames { public final class ConnManagerParams implements ConnManagerPNames {
/** The default maximum number of connections allowed overall */ /** The default maximum number of connections allowed overall */
@ -86,6 +87,7 @@ public final class ConnManagerParams implements ConnManagerPNames {
/** The default maximum number of connections allowed per host */ /** The default maximum number of connections allowed per host */
private static final ConnPerRoute DEFAULT_CONN_PER_ROUTE = new ConnPerRoute() { private static final ConnPerRoute DEFAULT_CONN_PER_ROUTE = new ConnPerRoute() {
@Override
public int getMaxForRoute(final HttpRoute route) { public int getMaxForRoute(final HttpRoute route) {
return ConnPerRouteBean.DEFAULT_MAX_CONNECTIONS_PER_ROUTE; return ConnPerRouteBean.DEFAULT_MAX_CONNECTIONS_PER_ROUTE;
} }

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnPerRouteBean.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.conn.params;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.pool.ConnPoolControl; import com.fr.third.org.apache.http.pool.ConnPoolControl;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
@ -46,7 +47,7 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.2) use {@link ConnPoolControl} * @deprecated (4.2) use {@link ConnPoolControl}
*/ */
@Deprecated @Deprecated
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
public final class ConnPerRouteBean implements ConnPerRoute { public final class ConnPerRouteBean implements ConnPerRoute {
/** The default maximum number of connections allowed per host */ /** The default maximum number of connections allowed per host */
@ -88,6 +89,7 @@ public final class ConnPerRouteBean implements ConnPerRoute {
this.maxPerHostMap.put(route, Integer.valueOf(max)); this.maxPerHostMap.put(route, Integer.valueOf(max));
} }
@Override
public int getMaxForRoute(final HttpRoute route) { public int getMaxForRoute(final HttpRoute route) {
Args.notNull(route, "HTTP route"); Args.notNull(route, "HTTP route");
final Integer max = this.maxPerHostMap.get(route); final Integer max = this.maxPerHostMap.get(route);

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParamBean.java

@ -30,7 +30,6 @@ package com.fr.third.org.apache.http.conn.params;
import java.net.InetAddress; import java.net.InetAddress;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.client.config.RequestConfig; import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames; import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
@ -47,7 +46,6 @@ import com.fr.third.org.apache.http.params.HttpParams;
* @deprecated (4.3) use {@link RequestConfig}. * @deprecated (4.3) use {@link RequestConfig}.
*/ */
@Deprecated @Deprecated
@NotThreadSafe
public class ConnRouteParamBean extends HttpAbstractParamBean { public class ConnRouteParamBean extends HttpAbstractParamBean {
public ConnRouteParamBean (final HttpParams params) { public ConnRouteParamBean (final HttpParams params) {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/params/ConnRouteParams.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.conn.params;
import java.net.InetAddress; import java.net.InetAddress;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.config.RequestConfig; import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames; import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
@ -45,7 +46,7 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.3) use {@link RequestConfig}. * @deprecated (4.3) use {@link RequestConfig}.
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class ConnRouteParams implements ConnRoutePNames { public class ConnRouteParams implements ConnRoutePNames {
/** /**

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/scheme/PlainSocketFactory.java

@ -34,7 +34,8 @@ import java.net.Socket;
import java.net.SocketTimeoutException; import java.net.SocketTimeoutException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.DnsResolver; import com.fr.third.org.apache.http.conn.DnsResolver;
import com.fr.third.org.apache.http.conn.socket.PlainConnectionSocketFactory; import com.fr.third.org.apache.http.conn.socket.PlainConnectionSocketFactory;
import com.fr.third.org.apache.http.conn.ConnectTimeoutException; import com.fr.third.org.apache.http.conn.ConnectTimeoutException;
@ -49,7 +50,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @deprecated (4.3) use {@link PlainConnectionSocketFactory} * @deprecated (4.3) use {@link PlainConnectionSocketFactory}
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory { public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
@ -85,10 +86,12 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
* *
* @since 4.1 * @since 4.1
*/ */
@Override
public Socket createSocket(final HttpParams params) { public Socket createSocket(final HttpParams params) {
return new Socket(); return new Socket();
} }
@Override
public Socket createSocket() { public Socket createSocket() {
return new Socket(); return new Socket();
} }
@ -96,6 +99,7 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
/** /**
* @since 4.1 * @since 4.1
*/ */
@Override
public Socket connectSocket( public Socket connectSocket(
final Socket socket, final Socket socket,
final InetSocketAddress remoteAddress, final InetSocketAddress remoteAddress,
@ -132,6 +136,7 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
* *
* @return {@code false} * @return {@code false}
*/ */
@Override
public final boolean isSecure(final Socket sock) { public final boolean isSecure(final Socket sock) {
return false; return false;
} }
@ -139,6 +144,7 @@ public class PlainSocketFactory implements SocketFactory, SchemeSocketFactory {
/** /**
* @deprecated (4.1) Use {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)} * @deprecated (4.1) Use {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)}
*/ */
@Override
@Deprecated @Deprecated
public Socket connectSocket( public Socket connectSocket(
final Socket socket, final Socket socket,

7
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLContextBuilder.java

@ -51,8 +51,6 @@ import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509KeyManager; import javax.net.ssl.X509KeyManager;
import javax.net.ssl.X509TrustManager; import javax.net.ssl.X509TrustManager;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
/** /**
* Builder for {@link SSLContext} instances. * Builder for {@link SSLContext} instances.
* *
@ -60,7 +58,6 @@ import com.fr.third.org.apache.http.annotation.NotThreadSafe;
* *
* @deprecated (4.4) use {@link com.fr.third.org.apache.http.ssl.SSLContextBuilder}. * @deprecated (4.4) use {@link com.fr.third.org.apache.http.ssl.SSLContextBuilder}.
*/ */
@NotThreadSafe
@Deprecated @Deprecated
public class SSLContextBuilder { public class SSLContextBuilder {
@ -68,8 +65,8 @@ public class SSLContextBuilder {
static final String SSL = "SSL"; static final String SSL = "SSL";
private String protocol; private String protocol;
private Set<KeyManager> keymanagers; private final Set<KeyManager> keymanagers;
private Set<TrustManager> trustmanagers; private final Set<TrustManager> trustmanagers;
private SecureRandom secureRandom; private SecureRandom secureRandom;
public SSLContextBuilder() { public SSLContextBuilder() {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLContexts.java

@ -32,7 +32,8 @@ import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
/** /**
* {@link SSLContext} factory methods. * {@link SSLContext} factory methods.
@ -41,7 +42,7 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* *
* @deprecated (4.4) use {@link com.fr.third.org.apache.http.ssl.SSLContexts}. * @deprecated (4.4) use {@link com.fr.third.org.apache.http.ssl.SSLContexts}.
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class SSLContexts { public class SSLContexts {

21
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/conn/ssl/SSLSocketFactory.java

@ -39,11 +39,13 @@ import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.security.UnrecoverableKeyException; import java.security.UnrecoverableKeyException;
import javax.net.SocketFactory;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocket;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ConnectTimeoutException; import com.fr.third.org.apache.http.conn.ConnectTimeoutException;
import com.fr.third.org.apache.http.conn.HttpInetSocketAddress; import com.fr.third.org.apache.http.conn.HttpInetSocketAddress;
import com.fr.third.org.apache.http.conn.scheme.HostNameResolver; import com.fr.third.org.apache.http.conn.scheme.HostNameResolver;
@ -139,7 +141,7 @@ import com.fr.third.org.apache.http.util.TextUtils;
* *
* @deprecated (4.3) use {@link SSLConnectionSocketFactory}. * @deprecated (4.3) use {@link SSLConnectionSocketFactory}.
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Deprecated @Deprecated
public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeLayeredSocketFactory, public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeLayeredSocketFactory,
LayeredSchemeSocketFactory, LayeredSocketFactory { LayeredSchemeSocketFactory, LayeredSocketFactory {
@ -379,10 +381,12 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
* This method will create a unconnected instance of {@link Socket} class. * This method will create a unconnected instance of {@link Socket} class.
* @since 4.1 * @since 4.1
*/ */
@Override
public Socket createSocket(final HttpParams params) throws IOException { public Socket createSocket(final HttpParams params) throws IOException {
return createSocket((HttpContext) null); return createSocket((HttpContext) null);
} }
@Override
public Socket createSocket() throws IOException { public Socket createSocket() throws IOException {
return createSocket((HttpContext) null); return createSocket((HttpContext) null);
} }
@ -390,6 +394,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
/** /**
* @since 4.1 * @since 4.1
*/ */
@Override
public Socket connectSocket( public Socket connectSocket(
final Socket socket, final Socket socket,
final InetSocketAddress remoteAddress, final InetSocketAddress remoteAddress,
@ -424,6 +429,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
* *
* @throws IllegalArgumentException if the argument is invalid * @throws IllegalArgumentException if the argument is invalid
*/ */
@Override
public boolean isSecure(final Socket sock) throws IllegalArgumentException { public boolean isSecure(final Socket sock) throws IllegalArgumentException {
Args.notNull(sock, "Socket"); Args.notNull(sock, "Socket");
Asserts.check(sock instanceof SSLSocket, "Socket not created by this factory"); Asserts.check(sock instanceof SSLSocket, "Socket not created by this factory");
@ -434,6 +440,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
/** /**
* @since 4.2 * @since 4.2
*/ */
@Override
public Socket createLayeredSocket( public Socket createLayeredSocket(
final Socket socket, final Socket socket,
final String host, final String host,
@ -442,6 +449,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
return createLayeredSocket(socket, host, port, (HttpContext) null); return createLayeredSocket(socket, host, port, (HttpContext) null);
} }
@Override
public Socket createLayeredSocket( public Socket createLayeredSocket(
final Socket socket, final Socket socket,
final String host, final String host,
@ -459,6 +467,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
return this.hostnameVerifier; return this.hostnameVerifier;
} }
@Override
public Socket connectSocket( public Socket connectSocket(
final Socket socket, final Socket socket,
final String host, final int port, final String host, final int port,
@ -479,6 +488,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
return connectSocket(socket, remoteAddress, localAddress, params); return connectSocket(socket, remoteAddress, localAddress, params);
} }
@Override
public Socket createSocket( public Socket createSocket(
final Socket socket, final Socket socket,
final String host, final int port, final String host, final int port,
@ -509,12 +519,12 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
prepareSocket(socket); prepareSocket(socket);
} }
@Override
public Socket createSocket(final HttpContext context) throws IOException { public Socket createSocket(final HttpContext context) throws IOException {
final SSLSocket sock = (SSLSocket) this.socketfactory.createSocket(); return SocketFactory.getDefault().createSocket();
internalPrepareSocket(sock);
return sock;
} }
@Override
public Socket connectSocket( public Socket connectSocket(
final int connectTimeout, final int connectTimeout,
final Socket socket, final Socket socket,
@ -548,6 +558,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
} }
} }
@Override
public Socket createLayeredSocket( public Socket createLayeredSocket(
final Socket socket, final Socket socket,
final String target, final String target,

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/cookie/params/CookieSpecParamBean.java

@ -29,7 +29,6 @@ package com.fr.third.org.apache.http.cookie.params;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames; import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.HttpAbstractParamBean; import com.fr.third.org.apache.http.params.HttpAbstractParamBean;
@ -46,7 +45,6 @@ import com.fr.third.org.apache.http.params.HttpParams;
* CookieSpecProvider}s. * CookieSpecProvider}s.
*/ */
@Deprecated @Deprecated
@NotThreadSafe
public class CookieSpecParamBean extends HttpAbstractParamBean { public class CookieSpecParamBean extends HttpAbstractParamBean {
public CookieSpecParamBean (final HttpParams params) { public CookieSpecParamBean (final HttpParams params) {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/NegotiateScheme.java

@ -79,6 +79,7 @@ public class NegotiateScheme extends GGSSchemeBase {
* *
* @return {@code Negotiate} * @return {@code Negotiate}
*/ */
@Override
public String getSchemeName() { public String getSchemeName() {
return "Negotiate"; return "Negotiate";
} }
@ -181,6 +182,7 @@ public class NegotiateScheme extends GGSSchemeBase {
* *
* @return the parameter with the given name * @return the parameter with the given name
*/ */
@Override
public String getParameter(final String name) { public String getParameter(final String name) {
Args.notNull(name, "Parameter name"); Args.notNull(name, "Parameter name");
return null; return null;
@ -192,6 +194,7 @@ public class NegotiateScheme extends GGSSchemeBase {
* *
* @return {@code null} * @return {@code null}
*/ */
@Override
public String getRealm() { public String getRealm() {
return null; return null;
} }
@ -202,6 +205,7 @@ public class NegotiateScheme extends GGSSchemeBase {
* *
* @return {@code true}. * @return {@code true}.
*/ */
@Override
public boolean isConnectionBased() { public boolean isConnectionBased() {
return true; return true;
} }

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/NegotiateSchemeFactory.java

@ -58,6 +58,7 @@ public class NegotiateSchemeFactory implements AuthSchemeFactory {
this(null, false); this(null, false);
} }
@Override
public AuthScheme newInstance(final HttpParams params) { public AuthScheme newInstance(final HttpParams params) {
return new NegotiateScheme(this.spengoGenerator, this.stripPort); return new NegotiateScheme(this.spengoGenerator, this.stripPort);
} }

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/auth/SpnegoTokenGenerator.java

@ -26,6 +26,7 @@
*/ */
package com.fr.third.org.apache.http.impl.auth; package com.fr.third.org.apache.http.impl.auth;
import com.fr.third.org.apache.http.auth.Credentials;
import com.fr.third.org.apache.http.impl.auth.KerberosScheme; import com.fr.third.org.apache.http.impl.auth.KerberosScheme;
import java.io.IOException; import java.io.IOException;
@ -39,7 +40,7 @@ import java.io.IOException;
* @since 4.1 * @since 4.1
* *
* @deprecated (4.2) 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, Credentials)}
*/ */
@Deprecated @Deprecated
public interface SpnegoTokenGenerator { public interface SpnegoTokenGenerator {

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractAuthenticationHandler.java

@ -41,7 +41,8 @@ import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.FormattedHeader; import com.fr.third.org.apache.http.FormattedHeader;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthSchemeRegistry; import com.fr.third.org.apache.http.auth.AuthSchemeRegistry;
import com.fr.third.org.apache.http.auth.AuthenticationException; import com.fr.third.org.apache.http.auth.AuthenticationException;
@ -62,7 +63,7 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* @deprecated (4.2) use {@link AuthenticationStrategy} * @deprecated (4.2) use {@link AuthenticationStrategy}
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public abstract class AbstractAuthenticationHandler implements AuthenticationHandler { public abstract class AbstractAuthenticationHandler implements AuthenticationHandler {
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());
@ -136,6 +137,7 @@ public abstract class AbstractAuthenticationHandler implements AuthenticationHan
return getAuthPreferences(); return getAuthPreferences();
} }
@Override
public AuthScheme selectScheme( public AuthScheme selectScheme(
final Map<String, Header> challenges, final Map<String, Header> challenges,
final HttpResponse response, final HttpResponse response,

72
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AbstractHttpClient.java

@ -39,8 +39,8 @@ import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpRequestInterceptor; import com.fr.third.org.apache.http.HttpRequestInterceptor;
import com.fr.third.org.apache.http.HttpResponseInterceptor; import com.fr.third.org.apache.http.HttpResponseInterceptor;
import com.fr.third.org.apache.http.annotation.GuardedBy; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthSchemeRegistry; import com.fr.third.org.apache.http.auth.AuthSchemeRegistry;
import com.fr.third.org.apache.http.client.AuthenticationHandler; import com.fr.third.org.apache.http.client.AuthenticationHandler;
import com.fr.third.org.apache.http.client.AuthenticationStrategy; import com.fr.third.org.apache.http.client.AuthenticationStrategy;
@ -195,85 +195,30 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @deprecated (4.3) use {@link HttpClientBuilder}. * @deprecated (4.3) use {@link HttpClientBuilder}.
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Deprecated @Deprecated
public abstract class AbstractHttpClient extends CloseableHttpClient { public abstract class AbstractHttpClient extends CloseableHttpClient {
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());
/** The parameters. */
@GuardedBy("this")
private HttpParams defaultParams; private HttpParams defaultParams;
/** The request executor. */
@GuardedBy("this")
private HttpRequestExecutor requestExec; private HttpRequestExecutor requestExec;
/** The connection manager. */
@GuardedBy("this")
private ClientConnectionManager connManager; private ClientConnectionManager connManager;
/** The connection re-use strategy. */
@GuardedBy("this")
private ConnectionReuseStrategy reuseStrategy; private ConnectionReuseStrategy reuseStrategy;
/** The connection keep-alive strategy. */
@GuardedBy("this")
private ConnectionKeepAliveStrategy keepAliveStrategy; private ConnectionKeepAliveStrategy keepAliveStrategy;
/** The cookie spec registry. */
@GuardedBy("this")
private CookieSpecRegistry supportedCookieSpecs; private CookieSpecRegistry supportedCookieSpecs;
/** The authentication scheme registry. */
@GuardedBy("this")
private AuthSchemeRegistry supportedAuthSchemes; private AuthSchemeRegistry supportedAuthSchemes;
/** The HTTP protocol processor and its immutable copy. */
@GuardedBy("this")
private BasicHttpProcessor mutableProcessor; private BasicHttpProcessor mutableProcessor;
@GuardedBy("this")
private ImmutableHttpProcessor protocolProcessor; private ImmutableHttpProcessor protocolProcessor;
/** The request retry handler. */
@GuardedBy("this")
private HttpRequestRetryHandler retryHandler; private HttpRequestRetryHandler retryHandler;
/** The redirect handler. */
@GuardedBy("this")
private RedirectStrategy redirectStrategy; private RedirectStrategy redirectStrategy;
/** The target authentication handler. */
@GuardedBy("this")
private AuthenticationStrategy targetAuthStrategy; private AuthenticationStrategy targetAuthStrategy;
/** The proxy authentication handler. */
@GuardedBy("this")
private AuthenticationStrategy proxyAuthStrategy; private AuthenticationStrategy proxyAuthStrategy;
/** The cookie store. */
@GuardedBy("this")
private CookieStore cookieStore; private CookieStore cookieStore;
/** The credentials provider. */
@GuardedBy("this")
private CredentialsProvider credsProvider; private CredentialsProvider credsProvider;
/** The route planner. */
@GuardedBy("this")
private HttpRoutePlanner routePlanner; private HttpRoutePlanner routePlanner;
/** The user token handler. */
@GuardedBy("this")
private UserTokenHandler userTokenHandler; private UserTokenHandler userTokenHandler;
/** The connection backoff strategy. */
@GuardedBy("this")
private ConnectionBackoffStrategy connectionBackoffStrategy; private ConnectionBackoffStrategy connectionBackoffStrategy;
/** The backoff manager. */
@GuardedBy("this")
private BackoffManager backoffManager; private BackoffManager backoffManager;
/** /**
@ -328,9 +273,15 @@ public abstract class AbstractHttpClient extends CloseableHttpClient {
final String className = (String) params.getParameter( final String className = (String) params.getParameter(
ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME); ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME);
final ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
if (className != null) { if (className != null) {
try { try {
final Class<?> clazz = Class.forName(className); final Class<?> clazz;
if (contextLoader != null) {
clazz = Class.forName(className, true, contextLoader);
} else {
clazz = Class.forName(className);
}
factory = (ClientConnectionManagerFactory) clazz.newInstance(); factory = (ClientConnectionManagerFactory) clazz.newInstance();
} catch (final ClassNotFoundException ex) { } catch (final ClassNotFoundException ex) {
throw new IllegalStateException("Invalid class name: " + className); throw new IllegalStateException("Invalid class name: " + className);
@ -462,6 +413,7 @@ public abstract class AbstractHttpClient extends CloseableHttpClient {
} }
// non-javadoc, see interface HttpClient // non-javadoc, see interface HttpClient
@Override
public synchronized final HttpParams getParams() { public synchronized final HttpParams getParams() {
if (defaultParams == null) { if (defaultParams == null) {
defaultParams = createHttpParams(); defaultParams = createHttpParams();
@ -480,6 +432,7 @@ public abstract class AbstractHttpClient extends CloseableHttpClient {
} }
@Override
public synchronized final ClientConnectionManager getConnectionManager() { public synchronized final ClientConnectionManager getConnectionManager() {
if (connManager == null) { if (connManager == null) {
connManager = createClientConnectionManager(); connManager = createClientConnectionManager();
@ -1008,6 +961,7 @@ public abstract class AbstractHttpClient extends CloseableHttpClient {
} }
@Override
public void close() { public void close() {
getConnectionManager().shutdown(); getConnectionManager().shutdown();
} }

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java

@ -38,7 +38,8 @@ import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AuthOption; import com.fr.third.org.apache.http.auth.AuthOption;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthScope; import com.fr.third.org.apache.http.auth.AuthScope;
@ -57,7 +58,7 @@ import com.fr.third.org.apache.http.util.Args;
/** /**
* @deprecated (4.2) do not use * @deprecated (4.2) do not use
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
class AuthenticationStrategyAdaptor implements AuthenticationStrategy { class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
@ -70,6 +71,7 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
this.handler = handler; this.handler = handler;
} }
@Override
public boolean isAuthenticationRequested( public boolean isAuthenticationRequested(
final HttpHost authhost, final HttpHost authhost,
final HttpResponse response, final HttpResponse response,
@ -77,6 +79,7 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
return this.handler.isAuthenticationRequested(response, context); return this.handler.isAuthenticationRequested(response, context);
} }
@Override
public Map<String, Header> getChallenges( public Map<String, Header> getChallenges(
final HttpHost authhost, final HttpHost authhost,
final HttpResponse response, final HttpResponse response,
@ -84,6 +87,7 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
return this.handler.getChallenges(response, context); return this.handler.getChallenges(response, context);
} }
@Override
public Queue<AuthOption> select( public Queue<AuthOption> select(
final Map<String, Header> challenges, final Map<String, Header> challenges,
final HttpHost authhost, final HttpHost authhost,
@ -128,6 +132,7 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
return options; return options;
} }
@Override
public void authSucceeded( public void authSucceeded(
final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) { final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE); AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE);
@ -144,6 +149,7 @@ class AuthenticationStrategyAdaptor implements AuthenticationStrategy {
} }
} }
@Override
public void authFailed( public void authFailed(
final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) { final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
final AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE); final AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE);

15
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/AutoRetryHttpClient.java

@ -36,7 +36,8 @@ import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.HttpClient; import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.ResponseHandler; import com.fr.third.org.apache.http.client.ResponseHandler;
import com.fr.third.org.apache.http.client.ServiceUnavailableRetryStrategy; import com.fr.third.org.apache.http.client.ServiceUnavailableRetryStrategy;
@ -56,7 +57,7 @@ import com.fr.third.org.apache.http.util.EntityUtils;
* @deprecated (4.3) use {@link HttpClientBuilder}. * @deprecated (4.3) use {@link HttpClientBuilder}.
*/ */
@Deprecated @Deprecated
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
public class AutoRetryHttpClient implements HttpClient { public class AutoRetryHttpClient implements HttpClient {
private final HttpClient backend; private final HttpClient backend;
@ -107,17 +108,20 @@ public class AutoRetryHttpClient implements HttpClient {
this(client, new DefaultServiceUnavailableRetryStrategy()); this(client, new DefaultServiceUnavailableRetryStrategy());
} }
@Override
public HttpResponse execute(final HttpHost target, final HttpRequest request) public HttpResponse execute(final HttpHost target, final HttpRequest request)
throws IOException { throws IOException {
final HttpContext defaultContext = null; final HttpContext defaultContext = null;
return execute(target, request, defaultContext); return execute(target, request, defaultContext);
} }
@Override
public <T> T execute(final HttpHost target, final HttpRequest request, public <T> T execute(final HttpHost target, final HttpRequest request,
final ResponseHandler<? extends T> responseHandler) throws IOException { final ResponseHandler<? extends T> responseHandler) throws IOException {
return execute(target, request, responseHandler, null); return execute(target, request, responseHandler, null);
} }
@Override
public <T> T execute(final HttpHost target, final HttpRequest request, public <T> T execute(final HttpHost target, final HttpRequest request,
final ResponseHandler<? extends T> responseHandler, final HttpContext context) final ResponseHandler<? extends T> responseHandler, final HttpContext context)
throws IOException { throws IOException {
@ -125,11 +129,13 @@ public class AutoRetryHttpClient implements HttpClient {
return responseHandler.handleResponse(resp); return responseHandler.handleResponse(resp);
} }
@Override
public HttpResponse execute(final HttpUriRequest request) throws IOException { public HttpResponse execute(final HttpUriRequest request) throws IOException {
final HttpContext context = null; final HttpContext context = null;
return execute(request, context); return execute(request, context);
} }
@Override
public HttpResponse execute(final HttpUriRequest request, final HttpContext context) public HttpResponse execute(final HttpUriRequest request, final HttpContext context)
throws IOException { throws IOException {
final URI uri = request.getURI(); final URI uri = request.getURI();
@ -138,11 +144,13 @@ public class AutoRetryHttpClient implements HttpClient {
return execute(httpHost, request, context); return execute(httpHost, request, context);
} }
@Override
public <T> T execute(final HttpUriRequest request, public <T> T execute(final HttpUriRequest request,
final ResponseHandler<? extends T> responseHandler) throws IOException { final ResponseHandler<? extends T> responseHandler) throws IOException {
return execute(request, responseHandler, null); return execute(request, responseHandler, null);
} }
@Override
public <T> T execute(final HttpUriRequest request, public <T> T execute(final HttpUriRequest request,
final ResponseHandler<? extends T> responseHandler, final HttpContext context) final ResponseHandler<? extends T> responseHandler, final HttpContext context)
throws IOException { throws IOException {
@ -150,6 +158,7 @@ public class AutoRetryHttpClient implements HttpClient {
return responseHandler.handleResponse(resp); return responseHandler.handleResponse(resp);
} }
@Override
public HttpResponse execute(final HttpHost target, final HttpRequest request, public HttpResponse execute(final HttpHost target, final HttpRequest request,
final HttpContext context) throws IOException { final HttpContext context) throws IOException {
for (int c = 1;; c++) { for (int c = 1;; c++) {
@ -179,10 +188,12 @@ public class AutoRetryHttpClient implements HttpClient {
} }
} }
@Override
public ClientConnectionManager getConnectionManager() { public ClientConnectionManager getConnectionManager() {
return backend.getConnectionManager(); return backend.getConnectionManager();
} }
@Override
public HttpParams getParams() { public HttpParams getParams() {
return backend.getParams(); return backend.getParams();
} }

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ClientParamsStack.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.impl.client; package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.client.HttpClient; import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.params.AbstractHttpParams; import com.fr.third.org.apache.http.params.AbstractHttpParams;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -67,10 +66,9 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
* *
* @deprecated (4.3) use configuration classes provided 'org.apache.http.config' * @deprecated (4.3) use configuration classes provided 'com.fr.third.org.apache.http.config'
* and 'org.apache.http.client.config' * and 'com.fr.third.org.apache.http.client.config'
*/ */
@NotThreadSafe
@Deprecated @Deprecated
public class ClientParamsStack extends AbstractHttpParams { public class ClientParamsStack extends AbstractHttpParams {
@ -190,6 +188,7 @@ public class ClientParamsStack extends AbstractHttpParams {
* @return the highest-priority value for that parameter, or * @return the highest-priority value for that parameter, or
* {@code null} if it is not set anywhere in this stack * {@code null} if it is not set anywhere in this stack
*/ */
@Override
public Object getParameter(final String name) { public Object getParameter(final String name) {
Args.notNull(name, "Parameter name"); Args.notNull(name, "Parameter name");
@ -223,6 +222,7 @@ public class ClientParamsStack extends AbstractHttpParams {
* *
* @throws UnsupportedOperationException always * @throws UnsupportedOperationException always
*/ */
@Override
public HttpParams setParameter(final String name, final Object value) public HttpParams setParameter(final String name, final Object value)
throws UnsupportedOperationException { throws UnsupportedOperationException {
@ -243,6 +243,7 @@ public class ClientParamsStack extends AbstractHttpParams {
* *
* @throws UnsupportedOperationException always * @throws UnsupportedOperationException always
*/ */
@Override
public boolean removeParameter(final String name) { public boolean removeParameter(final String name) {
throw new UnsupportedOperationException throw new UnsupportedOperationException
("Removing parameters in a stack is not supported."); ("Removing parameters in a stack is not supported.");
@ -263,6 +264,7 @@ public class ClientParamsStack extends AbstractHttpParams {
* *
* @return {@code this} parameter stack * @return {@code this} parameter stack
*/ */
@Override
public HttpParams copy() { public HttpParams copy() {
return this; return this;
} }

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/CloseableHttpResponseProxy.java

@ -36,7 +36,6 @@ import java.lang.reflect.Proxy;
import com.fr.third.org.apache.http.HttpEntity; import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.client.methods.CloseableHttpResponse; import com.fr.third.org.apache.http.client.methods.CloseableHttpResponse;
import com.fr.third.org.apache.http.util.EntityUtils; import com.fr.third.org.apache.http.util.EntityUtils;
@ -44,7 +43,6 @@ import com.fr.third.org.apache.http.util.EntityUtils;
* @since 4.3 * @since 4.3
*/ */
@Deprecated @Deprecated
@NotThreadSafe
class CloseableHttpResponseProxy implements InvocationHandler { class CloseableHttpResponseProxy implements InvocationHandler {
private final static Constructor<?> CONSTRUCTOR; private final static Constructor<?> CONSTRUCTOR;
@ -53,7 +51,7 @@ class CloseableHttpResponseProxy implements InvocationHandler {
try { try {
CONSTRUCTOR = Proxy.getProxyClass(CloseableHttpResponseProxy.class.getClassLoader(), CONSTRUCTOR = Proxy.getProxyClass(CloseableHttpResponseProxy.class.getClassLoader(),
new Class<?>[] { CloseableHttpResponse.class }).getConstructor(new Class[] { InvocationHandler.class }); new Class<?>[] { CloseableHttpResponse.class }).getConstructor(new Class[] { InvocationHandler.class });
} catch (NoSuchMethodException ex) { } catch (final NoSuchMethodException ex) {
throw new IllegalStateException(ex); throw new IllegalStateException(ex);
} }
} }
@ -94,11 +92,11 @@ class CloseableHttpResponseProxy implements InvocationHandler {
public static CloseableHttpResponse newProxy(final HttpResponse original) { public static CloseableHttpResponse newProxy(final HttpResponse original) {
try { try {
return (CloseableHttpResponse) CONSTRUCTOR.newInstance(new CloseableHttpResponseProxy(original)); return (CloseableHttpResponse) CONSTRUCTOR.newInstance(new CloseableHttpResponseProxy(original));
} catch (InstantiationException ex) { } catch (final InstantiationException ex) {
throw new IllegalStateException(ex); throw new IllegalStateException(ex);
} catch (InvocationTargetException ex) { } catch (final InvocationTargetException ex) {
throw new IllegalStateException(ex); throw new IllegalStateException(ex);
} catch (IllegalAccessException ex) { } catch (final IllegalAccessException ex) {
throw new IllegalStateException(ex); throw new IllegalStateException(ex);
} }
} }

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/ContentEncodingHttpClient.java

@ -26,7 +26,8 @@
*/ */
package com.fr.third.org.apache.http.impl.client; package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.HttpClient; import com.fr.third.org.apache.http.client.HttpClient;
import com.fr.third.org.apache.http.client.protocol.RequestAcceptEncoding; import com.fr.third.org.apache.http.client.protocol.RequestAcceptEncoding;
import com.fr.third.org.apache.http.client.protocol.ResponseContentEncoding; import com.fr.third.org.apache.http.client.protocol.ResponseContentEncoding;
@ -51,7 +52,7 @@ import com.fr.third.org.apache.http.protocol.BasicHttpProcessor;
* @deprecated (4.2) use {@link HttpClientBuilder} * @deprecated (4.2) use {@link HttpClientBuilder}
*/ */
@Deprecated @Deprecated
@ThreadSafe // since DefaultHttpClient is @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL) // since DefaultHttpClient is
public class ContentEncodingHttpClient extends DefaultHttpClient { public class ContentEncodingHttpClient extends DefaultHttpClient {
/** /**

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DecompressingHttpClient.java

@ -107,14 +107,17 @@ public class DecompressingHttpClient implements HttpClient {
this.contentEncodingInterceptor = responseInterceptor; this.contentEncodingInterceptor = responseInterceptor;
} }
@Override
public HttpParams getParams() { public HttpParams getParams() {
return backend.getParams(); return backend.getParams();
} }
@Override
public ClientConnectionManager getConnectionManager() { public ClientConnectionManager getConnectionManager() {
return backend.getConnectionManager(); return backend.getConnectionManager();
} }
@Override
public HttpResponse execute(final HttpUriRequest request) throws IOException, public HttpResponse execute(final HttpUriRequest request) throws IOException,
ClientProtocolException { ClientProtocolException {
return execute(getHttpHost(request), request, (HttpContext)null); return execute(getHttpHost(request), request, (HttpContext)null);
@ -134,16 +137,19 @@ public class DecompressingHttpClient implements HttpClient {
return URIUtils.extractHost(uri); return URIUtils.extractHost(uri);
} }
@Override
public HttpResponse execute(final HttpUriRequest request, final HttpContext context) public HttpResponse execute(final HttpUriRequest request, final HttpContext context)
throws IOException, ClientProtocolException { throws IOException, ClientProtocolException {
return execute(getHttpHost(request), request, context); return execute(getHttpHost(request), request, context);
} }
@Override
public HttpResponse execute(final HttpHost target, final HttpRequest request) public HttpResponse execute(final HttpHost target, final HttpRequest request)
throws IOException, ClientProtocolException { throws IOException, ClientProtocolException {
return execute(target, request, (HttpContext)null); return execute(target, request, (HttpContext)null);
} }
@Override
public HttpResponse execute(final HttpHost target, final HttpRequest request, public HttpResponse execute(final HttpHost target, final HttpRequest request,
final HttpContext context) throws IOException, ClientProtocolException { final HttpContext context) throws IOException, ClientProtocolException {
try { try {
@ -179,24 +185,28 @@ public class DecompressingHttpClient implements HttpClient {
} }
} }
@Override
public <T> T execute(final HttpUriRequest request, public <T> T execute(final HttpUriRequest request,
final ResponseHandler<? extends T> responseHandler) throws IOException, final ResponseHandler<? extends T> responseHandler) throws IOException,
ClientProtocolException { ClientProtocolException {
return execute(getHttpHost(request), request, responseHandler); return execute(getHttpHost(request), request, responseHandler);
} }
@Override
public <T> T execute(final HttpUriRequest request, public <T> T execute(final HttpUriRequest request,
final ResponseHandler<? extends T> responseHandler, final HttpContext context) final ResponseHandler<? extends T> responseHandler, final HttpContext context)
throws IOException, ClientProtocolException { throws IOException, ClientProtocolException {
return execute(getHttpHost(request), request, responseHandler, context); return execute(getHttpHost(request), request, responseHandler, context);
} }
@Override
public <T> T execute(final HttpHost target, final HttpRequest request, public <T> T execute(final HttpHost target, final HttpRequest request,
final ResponseHandler<? extends T> responseHandler) throws IOException, final ResponseHandler<? extends T> responseHandler) throws IOException,
ClientProtocolException { ClientProtocolException {
return execute(target, request, responseHandler, null); return execute(target, request, responseHandler, null);
} }
@Override
public <T> T execute(final HttpHost target, final HttpRequest request, public <T> T execute(final HttpHost target, final HttpRequest request,
final ResponseHandler<? extends T> responseHandler, final HttpContext context) final ResponseHandler<? extends T> responseHandler, final HttpContext context)
throws IOException, ClientProtocolException { throws IOException, ClientProtocolException {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultHttpClient.java

@ -35,7 +35,8 @@ import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.CoreConnectionPNames; import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import com.fr.third.org.apache.http.params.CoreProtocolPNames; import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import com.fr.third.org.apache.http.HttpVersion; import com.fr.third.org.apache.http.HttpVersion;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.protocol.RequestAddCookies; import com.fr.third.org.apache.http.client.protocol.RequestAddCookies;
import com.fr.third.org.apache.http.client.protocol.RequestAuthCache; import com.fr.third.org.apache.http.client.protocol.RequestAuthCache;
import com.fr.third.org.apache.http.client.protocol.RequestClientConnControl; import com.fr.third.org.apache.http.client.protocol.RequestClientConnControl;
@ -119,7 +120,7 @@ import com.fr.third.org.apache.http.util.VersionInfo;
* *
* @deprecated (4.3) use {@link HttpClientBuilder} see also {@link CloseableHttpClient}. * @deprecated (4.3) use {@link HttpClientBuilder} see also {@link CloseableHttpClient}.
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Deprecated @Deprecated
public class DefaultHttpClient extends AbstractHttpClient { public class DefaultHttpClient extends AbstractHttpClient {

7
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java

@ -33,7 +33,8 @@ import java.util.Map;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpStatus; import com.fr.third.org.apache.http.HttpStatus;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.MalformedChallengeException; import com.fr.third.org.apache.http.auth.MalformedChallengeException;
import com.fr.third.org.apache.http.auth.params.AuthPNames; import com.fr.third.org.apache.http.auth.params.AuthPNames;
@ -50,13 +51,14 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.2) use {@link ProxyAuthenticationStrategy} * @deprecated (4.2) use {@link ProxyAuthenticationStrategy}
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class DefaultProxyAuthenticationHandler extends AbstractAuthenticationHandler { public class DefaultProxyAuthenticationHandler extends AbstractAuthenticationHandler {
public DefaultProxyAuthenticationHandler() { public DefaultProxyAuthenticationHandler() {
super(); super();
} }
@Override
public boolean isAuthenticationRequested( public boolean isAuthenticationRequested(
final HttpResponse response, final HttpResponse response,
final HttpContext context) { final HttpContext context) {
@ -65,6 +67,7 @@ public class DefaultProxyAuthenticationHandler extends AbstractAuthenticationHan
return status == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED; return status == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED;
} }
@Override
public Map<String, Header> getChallenges( public Map<String, Header> getChallenges(
final HttpResponse response, final HttpResponse response,
final HttpContext context) throws MalformedChallengeException { final HttpContext context) throws MalformedChallengeException {

7
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRedirectHandler.java

@ -40,7 +40,8 @@ import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpStatus; import com.fr.third.org.apache.http.HttpStatus;
import com.fr.third.org.apache.http.ProtocolException; import com.fr.third.org.apache.http.ProtocolException;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.CircularRedirectException; import com.fr.third.org.apache.http.client.CircularRedirectException;
import com.fr.third.org.apache.http.client.RedirectHandler; import com.fr.third.org.apache.http.client.RedirectHandler;
import com.fr.third.org.apache.http.client.methods.HttpGet; import com.fr.third.org.apache.http.client.methods.HttpGet;
@ -60,7 +61,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @deprecated (4.1) use {@link DefaultRedirectStrategy}. * @deprecated (4.1) use {@link DefaultRedirectStrategy}.
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class DefaultRedirectHandler implements RedirectHandler { public class DefaultRedirectHandler implements RedirectHandler {
@ -72,6 +73,7 @@ public class DefaultRedirectHandler implements RedirectHandler {
super(); super();
} }
@Override
public boolean isRedirectRequested( public boolean isRedirectRequested(
final HttpResponse response, final HttpResponse response,
final HttpContext context) { final HttpContext context) {
@ -94,6 +96,7 @@ public class DefaultRedirectHandler implements RedirectHandler {
} //end of switch } //end of switch
} }
@Override
public URI getLocationURI( public URI getLocationURI(
final HttpResponse response, final HttpResponse response,
final HttpContext context) throws ProtocolException { final HttpContext context) throws ProtocolException {

7
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRedirectStrategyAdaptor.java

@ -32,7 +32,8 @@ import java.net.URI;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.ProtocolException; import com.fr.third.org.apache.http.ProtocolException;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.RedirectHandler; import com.fr.third.org.apache.http.client.RedirectHandler;
import com.fr.third.org.apache.http.client.RedirectStrategy; import com.fr.third.org.apache.http.client.RedirectStrategy;
import com.fr.third.org.apache.http.client.methods.HttpGet; import com.fr.third.org.apache.http.client.methods.HttpGet;
@ -43,7 +44,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
/** /**
* @deprecated (4.1) do not use * @deprecated (4.1) do not use
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
class DefaultRedirectStrategyAdaptor implements RedirectStrategy { class DefaultRedirectStrategyAdaptor implements RedirectStrategy {
@ -54,6 +55,7 @@ class DefaultRedirectStrategyAdaptor implements RedirectStrategy {
this.handler = handler; this.handler = handler;
} }
@Override
public boolean isRedirected( public boolean isRedirected(
final HttpRequest request, final HttpRequest request,
final HttpResponse response, final HttpResponse response,
@ -61,6 +63,7 @@ class DefaultRedirectStrategyAdaptor implements RedirectStrategy {
return this.handler.isRedirectRequested(response, context); return this.handler.isRedirectRequested(response, context);
} }
@Override
public HttpUriRequest getRedirect( public HttpUriRequest getRedirect(
final HttpRequest request, final HttpRequest request,
final HttpResponse response, final HttpResponse response,

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultRequestDirector.java

@ -50,7 +50,6 @@ import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.NoHttpResponseException; import com.fr.third.org.apache.http.NoHttpResponseException;
import com.fr.third.org.apache.http.ProtocolException; import com.fr.third.org.apache.http.ProtocolException;
import com.fr.third.org.apache.http.ProtocolVersion; import com.fr.third.org.apache.http.ProtocolVersion;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.auth.AuthProtocolState; import com.fr.third.org.apache.http.auth.AuthProtocolState;
import com.fr.third.org.apache.http.auth.AuthScheme; import com.fr.third.org.apache.http.auth.AuthScheme;
import com.fr.third.org.apache.http.auth.AuthState; import com.fr.third.org.apache.http.auth.AuthState;
@ -137,7 +136,6 @@ import com.fr.third.org.apache.http.util.EntityUtils;
* @deprecated (4.3) * @deprecated (4.3)
*/ */
@Deprecated @Deprecated
@NotThreadSafe // e.g. managedConn
public class DefaultRequestDirector implements RequestDirector { public class DefaultRequestDirector implements RequestDirector {
private final Log log; private final Log log;
@ -371,6 +369,7 @@ public class DefaultRequestDirector implements RequestDirector {
// non-javadoc, see interface ClientRequestDirector // non-javadoc, see interface ClientRequestDirector
@Override
public HttpResponse execute(final HttpHost targetHost, final HttpRequest request, public HttpResponse execute(final HttpHost targetHost, final HttpRequest request,
final HttpContext context) final HttpContext context)
throws HttpException, IOException { throws HttpException, IOException {

7
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java

@ -33,7 +33,8 @@ import java.util.Map;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpStatus; import com.fr.third.org.apache.http.HttpStatus;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.auth.AUTH; import com.fr.third.org.apache.http.auth.AUTH;
import com.fr.third.org.apache.http.auth.MalformedChallengeException; import com.fr.third.org.apache.http.auth.MalformedChallengeException;
import com.fr.third.org.apache.http.auth.params.AuthPNames; import com.fr.third.org.apache.http.auth.params.AuthPNames;
@ -50,13 +51,14 @@ import com.fr.third.org.apache.http.util.Args;
* @deprecated (4.2) use {@link TargetAuthenticationStrategy} * @deprecated (4.2) use {@link TargetAuthenticationStrategy}
*/ */
@Deprecated @Deprecated
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class DefaultTargetAuthenticationHandler extends AbstractAuthenticationHandler { public class DefaultTargetAuthenticationHandler extends AbstractAuthenticationHandler {
public DefaultTargetAuthenticationHandler() { public DefaultTargetAuthenticationHandler() {
super(); super();
} }
@Override
public boolean isAuthenticationRequested( public boolean isAuthenticationRequested(
final HttpResponse response, final HttpResponse response,
final HttpContext context) { final HttpContext context) {
@ -65,6 +67,7 @@ public class DefaultTargetAuthenticationHandler extends AbstractAuthenticationHa
return status == HttpStatus.SC_UNAUTHORIZED; return status == HttpStatus.SC_UNAUTHORIZED;
} }
@Override
public Map<String, Header> getChallenges( public Map<String, Header> getChallenges(
final HttpResponse response, final HttpResponse response,
final HttpContext context) throws MalformedChallengeException { final HttpContext context) throws MalformedChallengeException {

4
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/RoutedRequest.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.impl.client; package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.impl.client.RequestWrapper; import com.fr.third.org.apache.http.impl.client.RequestWrapper;
@ -39,11 +38,10 @@ import com.fr.third.org.apache.http.impl.client.RequestWrapper;
* @deprecated (4.3) do not use. * @deprecated (4.3) do not use.
*/ */
@Deprecated @Deprecated
@NotThreadSafe // RequestWrapper is @NotThreadSafe
public class RoutedRequest { public class RoutedRequest {
protected final RequestWrapper request; // @NotThreadSafe protected final RequestWrapper request; // @NotThreadSafe
protected final HttpRoute route; // @Immutable protected final HttpRoute route; // @Contract(threading = ThreadingBehavior.IMMUTABLE)
/** /**
* Creates a new routed request. * Creates a new routed request.

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/SystemDefaultHttpClient.java

@ -36,7 +36,8 @@ import com.fr.third.org.apache.http.cookie.params.CookieSpecPNames;
import com.fr.third.org.apache.http.params.CoreConnectionPNames; import com.fr.third.org.apache.http.params.CoreConnectionPNames;
import com.fr.third.org.apache.http.params.CoreProtocolPNames; import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import com.fr.third.org.apache.http.ConnectionReuseStrategy; import com.fr.third.org.apache.http.ConnectionReuseStrategy;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.routing.HttpRoutePlanner; import com.fr.third.org.apache.http.conn.routing.HttpRoutePlanner;
import com.fr.third.org.apache.http.impl.DefaultConnectionReuseStrategy; import com.fr.third.org.apache.http.impl.DefaultConnectionReuseStrategy;
@ -110,7 +111,7 @@ import com.fr.third.org.apache.http.params.HttpParams;
* *
* @deprecated (4.3) use {@link HttpClientBuilder} * @deprecated (4.3) use {@link HttpClientBuilder}
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Deprecated @Deprecated
public class SystemDefaultHttpClient extends DefaultHttpClient { public class SystemDefaultHttpClient extends DefaultHttpClient {

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/client/TunnelRefusedException.java

@ -29,7 +29,6 @@ package com.fr.third.org.apache.http.impl.client;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.Immutable;
/** /**
* Signals that the tunnel request was rejected by the proxy host. * Signals that the tunnel request was rejected by the proxy host.
@ -39,7 +38,6 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* @deprecated (4.3) reserved for internal use. * @deprecated (4.3) reserved for internal use.
*/ */
@Deprecated @Deprecated
@Immutable
public class TunnelRefusedException extends HttpException { public class TunnelRefusedException extends HttpException {
private static final long serialVersionUID = -8646722842745617323L; private static final long serialVersionUID = -8646722842745617323L;

30
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractClientConnAdapter.java

@ -40,7 +40,6 @@ import com.fr.third.org.apache.http.HttpEntityEnclosingRequest;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ManagedClientConnection; import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.impl.conn.ConnectionShutdownException; import com.fr.third.org.apache.http.impl.conn.ConnectionShutdownException;
@ -71,7 +70,6 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* @deprecated (4.2) do not use * @deprecated (4.2) do not use
*/ */
@Deprecated @Deprecated
@NotThreadSafe
public abstract class AbstractClientConnAdapter implements ManagedClientConnection, HttpContext { public abstract class AbstractClientConnAdapter implements ManagedClientConnection, HttpContext {
/** /**
@ -157,6 +155,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
} }
} }
@Override
public boolean isOpen() { public boolean isOpen() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
if (conn == null) { if (conn == null) {
@ -166,6 +165,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
return conn.isOpen(); return conn.isOpen();
} }
@Override
public boolean isStale() { public boolean isStale() {
if (isReleased()) { if (isReleased()) {
return true; return true;
@ -178,36 +178,42 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
return conn.isStale(); return conn.isStale();
} }
@Override
public void setSocketTimeout(final int timeout) { public void setSocketTimeout(final int timeout) {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
conn.setSocketTimeout(timeout); conn.setSocketTimeout(timeout);
} }
@Override
public int getSocketTimeout() { public int getSocketTimeout() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.getSocketTimeout(); return conn.getSocketTimeout();
} }
@Override
public HttpConnectionMetrics getMetrics() { public HttpConnectionMetrics getMetrics() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.getMetrics(); return conn.getMetrics();
} }
@Override
public void flush() throws IOException { public void flush() throws IOException {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
conn.flush(); conn.flush();
} }
@Override
public boolean isResponseAvailable(final int timeout) throws IOException { public boolean isResponseAvailable(final int timeout) throws IOException {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.isResponseAvailable(timeout); return conn.isResponseAvailable(timeout);
} }
@Override
public void receiveResponseEntity(final HttpResponse response) public void receiveResponseEntity(final HttpResponse response)
throws HttpException, IOException { throws HttpException, IOException {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
@ -216,6 +222,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
conn.receiveResponseEntity(response); conn.receiveResponseEntity(response);
} }
@Override
public HttpResponse receiveResponseHeader() public HttpResponse receiveResponseHeader()
throws HttpException, IOException { throws HttpException, IOException {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
@ -224,6 +231,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
return conn.receiveResponseHeader(); return conn.receiveResponseHeader();
} }
@Override
public void sendRequestEntity(final HttpEntityEnclosingRequest request) public void sendRequestEntity(final HttpEntityEnclosingRequest request)
throws HttpException, IOException { throws HttpException, IOException {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
@ -232,6 +240,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
conn.sendRequestEntity(request); conn.sendRequestEntity(request);
} }
@Override
public void sendRequestHeader(final HttpRequest request) public void sendRequestHeader(final HttpRequest request)
throws HttpException, IOException { throws HttpException, IOException {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
@ -240,40 +249,47 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
conn.sendRequestHeader(request); conn.sendRequestHeader(request);
} }
@Override
public InetAddress getLocalAddress() { public InetAddress getLocalAddress() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.getLocalAddress(); return conn.getLocalAddress();
} }
@Override
public int getLocalPort() { public int getLocalPort() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.getLocalPort(); return conn.getLocalPort();
} }
@Override
public InetAddress getRemoteAddress() { public InetAddress getRemoteAddress() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.getRemoteAddress(); return conn.getRemoteAddress();
} }
@Override
public int getRemotePort() { public int getRemotePort() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.getRemotePort(); return conn.getRemotePort();
} }
@Override
public boolean isSecure() { public boolean isSecure() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
return conn.isSecure(); return conn.isSecure();
} }
@Override
public void bind(final Socket socket) throws IOException { public void bind(final Socket socket) throws IOException {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public Socket getSocket() { public Socket getSocket() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
@ -283,6 +299,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
return conn.getSocket(); return conn.getSocket();
} }
@Override
public SSLSession getSSLSession() { public SSLSession getSSLSession() {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
@ -298,18 +315,22 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
return result; return result;
} }
@Override
public void markReusable() { public void markReusable() {
markedReusable = true; markedReusable = true;
} }
@Override
public void unmarkReusable() { public void unmarkReusable() {
markedReusable = false; markedReusable = false;
} }
@Override
public boolean isMarkedReusable() { public boolean isMarkedReusable() {
return markedReusable; return markedReusable;
} }
@Override
public void setIdleDuration(final long duration, final TimeUnit unit) { public void setIdleDuration(final long duration, final TimeUnit unit) {
if(duration > 0) { if(duration > 0) {
this.duration = unit.toMillis(duration); this.duration = unit.toMillis(duration);
@ -318,6 +339,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
} }
} }
@Override
public synchronized void releaseConnection() { public synchronized void releaseConnection() {
if (released) { if (released) {
return; return;
@ -326,6 +348,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
connManager.releaseConnection(this, duration, TimeUnit.MILLISECONDS); connManager.releaseConnection(this, duration, TimeUnit.MILLISECONDS);
} }
@Override
public synchronized void abortConnection() { public synchronized void abortConnection() {
if (released) { if (released) {
return; return;
@ -339,6 +362,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
connManager.releaseConnection(this, duration, TimeUnit.MILLISECONDS); connManager.releaseConnection(this, duration, TimeUnit.MILLISECONDS);
} }
@Override
public Object getAttribute(final String id) { public Object getAttribute(final String id) {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
@ -349,6 +373,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
} }
} }
@Override
public Object removeAttribute(final String id) { public Object removeAttribute(final String id) {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);
@ -359,6 +384,7 @@ public abstract class AbstractClientConnAdapter implements ManagedClientConnecti
} }
} }
@Override
public void setAttribute(final String id, final Object obj) { public void setAttribute(final String id, final Object obj) {
final OperatedClientConnection conn = getWrappedConnection(); final OperatedClientConnection conn = getWrappedConnection();
assertValid(conn); assertValid(conn);

12
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/AbstractPooledConnAdapter.java

@ -29,8 +29,8 @@ package com.fr.third.org.apache.http.impl.conn;
import java.io.IOException; import java.io.IOException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ManagedClientConnection;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
@ -68,6 +68,7 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
this.poolEntry = entry; this.poolEntry = entry;
} }
@Override
public String getId() { public String getId() {
return null; return null;
} }
@ -118,12 +119,14 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
super.detach(); super.detach();
} }
@Override
public HttpRoute getRoute() { public HttpRoute getRoute() {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
assertValid(entry); assertValid(entry);
return (entry.tracker == null) ? null : entry.tracker.toRoute(); return (entry.tracker == null) ? null : entry.tracker.toRoute();
} }
@Override
public void open(final HttpRoute route, public void open(final HttpRoute route,
final HttpContext context, final HttpParams params) final HttpContext context, final HttpParams params)
throws IOException { throws IOException {
@ -132,6 +135,7 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
entry.open(route, context, params); entry.open(route, context, params);
} }
@Override
public void tunnelTarget(final boolean secure, final HttpParams params) public void tunnelTarget(final boolean secure, final HttpParams params)
throws IOException { throws IOException {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
@ -139,6 +143,7 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
entry.tunnelTarget(secure, params); entry.tunnelTarget(secure, params);
} }
@Override
public void tunnelProxy(final HttpHost next, final boolean secure, final HttpParams params) public void tunnelProxy(final HttpHost next, final boolean secure, final HttpParams params)
throws IOException { throws IOException {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
@ -146,6 +151,7 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
entry.tunnelProxy(next, secure, params); entry.tunnelProxy(next, secure, params);
} }
@Override
public void layerProtocol(final HttpContext context, final HttpParams params) public void layerProtocol(final HttpContext context, final HttpParams params)
throws IOException { throws IOException {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
@ -153,6 +159,7 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
entry.layerProtocol(context, params); entry.layerProtocol(context, params);
} }
@Override
public void close() throws IOException { public void close() throws IOException {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
if (entry != null) { if (entry != null) {
@ -165,6 +172,7 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
} }
} }
@Override
public void shutdown() throws IOException { public void shutdown() throws IOException {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
if (entry != null) { if (entry != null) {
@ -177,12 +185,14 @@ public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapte
} }
} }
@Override
public Object getState() { public Object getState() {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
assertValid(entry); assertValid(entry);
return entry.getState(); return entry.getState();
} }
@Override
public void setState(final Object state) { public void setState(final Object state) {
final AbstractPoolEntry entry = getPoolEntry(); final AbstractPoolEntry entry = getPoolEntry();
assertValid(entry); assertValid(entry);

17
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/BasicClientConnectionManager.java

@ -34,8 +34,8 @@ import java.util.concurrent.atomic.AtomicLong;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpClientConnection; import com.fr.third.org.apache.http.HttpClientConnection;
import com.fr.third.org.apache.http.annotation.GuardedBy; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.ClientConnectionRequest; import com.fr.third.org.apache.http.conn.ClientConnectionRequest;
@ -66,7 +66,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @deprecated (4.3) use {@link BasicHttpClientConnectionManager}. * @deprecated (4.3) use {@link BasicHttpClientConnectionManager}.
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
public class BasicClientConnectionManager implements ClientConnectionManager { public class BasicClientConnectionManager implements ClientConnectionManager {
@ -86,15 +86,12 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
private final ClientConnectionOperator connOperator; private final ClientConnectionOperator connOperator;
/** The one and only entry in this pool. */ /** The one and only entry in this pool. */
@GuardedBy("this")
private HttpPoolEntry poolEntry; private HttpPoolEntry poolEntry;
/** The currently issued managed connection, if any. */ /** The currently issued managed connection, if any. */
@GuardedBy("this")
private ManagedClientConnectionImpl conn; private ManagedClientConnectionImpl conn;
/** Indicates whether this connection manager is shut down. */ /** Indicates whether this connection manager is shut down. */
@GuardedBy("this")
private volatile boolean shutdown; private volatile boolean shutdown;
/** /**
@ -121,6 +118,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
} }
@Override
public SchemeRegistry getSchemeRegistry() { public SchemeRegistry getSchemeRegistry() {
return this.schemeRegistry; return this.schemeRegistry;
} }
@ -129,16 +127,19 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
return new DefaultClientConnectionOperator(schreg); return new DefaultClientConnectionOperator(schreg);
} }
@Override
public final ClientConnectionRequest requestConnection( public final ClientConnectionRequest requestConnection(
final HttpRoute route, final HttpRoute route,
final Object state) { final Object state) {
return new ClientConnectionRequest() { return new ClientConnectionRequest() {
@Override
public void abortRequest() { public void abortRequest() {
// Nothing to abort, since requests are immediate. // Nothing to abort, since requests are immediate.
} }
@Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final TimeUnit tunit) { final long timeout, final TimeUnit tunit) {
return BasicClientConnectionManager.this.getConnection( return BasicClientConnectionManager.this.getConnection(
@ -189,6 +190,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
} }
@Override
public void releaseConnection(final ManagedClientConnection conn, final long keepalive, final TimeUnit tunit) { public void releaseConnection(final ManagedClientConnection conn, final long keepalive, final TimeUnit tunit) {
Args.check(conn instanceof ManagedClientConnectionImpl, "Connection class mismatch, " + Args.check(conn instanceof ManagedClientConnectionImpl, "Connection class mismatch, " +
"connection not obtained from this manager"); "connection not obtained from this manager");
@ -234,6 +236,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
} }
@Override
public void closeExpiredConnections() { public void closeExpiredConnections() {
synchronized (this) { synchronized (this) {
assertNotShutdown(); assertNotShutdown();
@ -245,6 +248,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
} }
@Override
public void closeIdleConnections(final long idletime, final TimeUnit tunit) { public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
Args.notNull(tunit, "Time unit"); Args.notNull(tunit, "Time unit");
synchronized (this) { synchronized (this) {
@ -261,6 +265,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
} }
} }
@Override
public void shutdown() { public void shutdown() {
synchronized (this) { synchronized (this) {
this.shutdown = true; this.shutdown = true;

15
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnection.java

@ -44,9 +44,8 @@ import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.HttpResponseFactory; import com.fr.third.org.apache.http.HttpResponseFactory;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.conn.ManagedHttpClientConnection; import com.fr.third.org.apache.http.conn.ManagedHttpClientConnection;
import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.impl.SocketHttpClientConnection; import com.fr.third.org.apache.http.impl.SocketHttpClientConnection;
import com.fr.third.org.apache.http.io.HttpMessageParser; import com.fr.third.org.apache.http.io.HttpMessageParser;
import com.fr.third.org.apache.http.io.SessionInputBuffer; import com.fr.third.org.apache.http.io.SessionInputBuffer;
@ -64,7 +63,6 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @deprecated (4.3) use {@link ManagedHttpClientConnectionFactory}. * @deprecated (4.3) use {@link ManagedHttpClientConnectionFactory}.
*/ */
@NotThreadSafe // connSecure, targetHost
@Deprecated @Deprecated
public class DefaultClientConnection extends SocketHttpClientConnection public class DefaultClientConnection extends SocketHttpClientConnection
implements OperatedClientConnection, ManagedHttpClientConnection, HttpContext { implements OperatedClientConnection, ManagedHttpClientConnection, HttpContext {
@ -93,14 +91,17 @@ public class DefaultClientConnection extends SocketHttpClientConnection
this.attributes = new HashMap<String, Object>(); this.attributes = new HashMap<String, Object>();
} }
@Override
public String getId() { public String getId() {
return null; return null;
} }
@Override
public final HttpHost getTargetHost() { public final HttpHost getTargetHost() {
return this.targetHost; return this.targetHost;
} }
@Override
public final boolean isSecure() { public final boolean isSecure() {
return this.connSecure; return this.connSecure;
} }
@ -110,6 +111,7 @@ public class DefaultClientConnection extends SocketHttpClientConnection
return this.socket; return this.socket;
} }
@Override
public SSLSession getSSLSession() { public SSLSession getSSLSession() {
if (this.socket instanceof SSLSocket) { if (this.socket instanceof SSLSocket) {
return ((SSLSocket) this.socket).getSession(); return ((SSLSocket) this.socket).getSession();
@ -118,6 +120,7 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} }
} }
@Override
public void opening(final Socket sock, final HttpHost target) throws IOException { public void opening(final Socket sock, final HttpHost target) throws IOException {
assertNotOpen(); assertNotOpen();
this.socket = sock; this.socket = sock;
@ -131,6 +134,7 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} }
} }
@Override
public void openCompleted(final boolean secure, final HttpParams params) throws IOException { public void openCompleted(final boolean secure, final HttpParams params) throws IOException {
Args.notNull(params, "Parameters"); Args.notNull(params, "Parameters");
assertNotOpen(); assertNotOpen();
@ -226,10 +230,12 @@ public class DefaultClientConnection extends SocketHttpClientConnection
(buffer, null, responseFactory, params); (buffer, null, responseFactory, params);
} }
@Override
public void bind(final Socket socket) throws IOException { public void bind(final Socket socket) throws IOException {
bind(socket, new BasicHttpParams()); bind(socket, new BasicHttpParams());
} }
@Override
public void update(final Socket sock, final HttpHost target, public void update(final Socket sock, final HttpHost target,
final boolean secure, final HttpParams params) final boolean secure, final HttpParams params)
throws IOException { throws IOException {
@ -277,14 +283,17 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} }
} }
@Override
public Object getAttribute(final String id) { public Object getAttribute(final String id) {
return this.attributes.get(id); return this.attributes.get(id);
} }
@Override
public Object removeAttribute(final String id) { public Object removeAttribute(final String id) {
return this.attributes.remove(id); return this.attributes.remove(id);
} }
@Override
public void setAttribute(final String id, final Object obj) { public void setAttribute(final String id, final Object obj) {
this.attributes.put(id, obj); this.attributes.put(id, obj);
} }

10
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultClientConnectionOperator.java

@ -39,7 +39,8 @@ import com.fr.third.org.apache.http.params.CoreProtocolPNames;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.protocol.ClientContext; import com.fr.third.org.apache.http.client.protocol.ClientContext;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.ConnectTimeoutException; import com.fr.third.org.apache.http.conn.ConnectTimeoutException;
@ -88,13 +89,13 @@ import com.fr.third.org.apache.http.util.Asserts;
* @deprecated (4.3) use {@link PoolingHttpClientConnectionManager}. * @deprecated (4.3) use {@link PoolingHttpClientConnectionManager}.
*/ */
@Deprecated @Deprecated
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
public class DefaultClientConnectionOperator implements ClientConnectionOperator { public class DefaultClientConnectionOperator implements ClientConnectionOperator {
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());
/** The scheme registry for looking up socket factories. */ /** The scheme registry for looking up socket factories. */
protected final SchemeRegistry schemeRegistry; // @ThreadSafe protected final SchemeRegistry schemeRegistry; // @Contract(threading = ThreadingBehavior.SAFE)
/** the custom-configured DNS lookup mechanism. */ /** the custom-configured DNS lookup mechanism. */
protected final DnsResolver dnsResolver; protected final DnsResolver dnsResolver;
@ -130,6 +131,7 @@ public class DefaultClientConnectionOperator implements ClientConnectionOperator
this.dnsResolver = dnsResolver; this.dnsResolver = dnsResolver;
} }
@Override
public OperatedClientConnection createConnection() { public OperatedClientConnection createConnection() {
return new DefaultClientConnection(); return new DefaultClientConnection();
} }
@ -143,6 +145,7 @@ public class DefaultClientConnectionOperator implements ClientConnectionOperator
return reg; return reg;
} }
@Override
public void openConnection( public void openConnection(
final OperatedClientConnection conn, final OperatedClientConnection conn,
final HttpHost target, final HttpHost target,
@ -200,6 +203,7 @@ public class DefaultClientConnectionOperator implements ClientConnectionOperator
} }
} }
@Override
public void updateSecureConnection( public void updateSecureConnection(
final OperatedClientConnection conn, final OperatedClientConnection conn,
final HttpHost target, final HttpHost target,

8
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java

@ -33,7 +33,8 @@ import java.net.InetAddress;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames; import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.impl.conn.DefaultRoutePlanner; import com.fr.third.org.apache.http.impl.conn.DefaultRoutePlanner;
import com.fr.third.org.apache.http.conn.params.ConnRouteParams; import com.fr.third.org.apache.http.conn.params.ConnRouteParams;
@ -63,12 +64,12 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @deprecated (4.3) use {@link DefaultRoutePlanner} * @deprecated (4.3) use {@link DefaultRoutePlanner}
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
public class DefaultHttpRoutePlanner implements HttpRoutePlanner { public class DefaultHttpRoutePlanner implements HttpRoutePlanner {
/** The scheme registry. */ /** The scheme registry. */
protected final SchemeRegistry schemeRegistry; // class is @ThreadSafe protected final SchemeRegistry schemeRegistry; // class is @Contract(threading = ThreadingBehavior.SAFE)
/** /**
* Creates a new default route planner. * Creates a new default route planner.
@ -80,6 +81,7 @@ public class DefaultHttpRoutePlanner implements HttpRoutePlanner {
schemeRegistry = schreg; schemeRegistry = schreg;
} }
@Override
public HttpRoute determineRoute(final HttpHost target, public HttpRoute determineRoute(final HttpHost target,
final HttpRequest request, final HttpRequest request,
final HttpContext context) final HttpContext context)

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/DefaultResponseParser.java

@ -40,7 +40,8 @@ import com.fr.third.org.apache.http.HttpResponseFactory;
import com.fr.third.org.apache.http.NoHttpResponseException; import com.fr.third.org.apache.http.NoHttpResponseException;
import com.fr.third.org.apache.http.ProtocolException; import com.fr.third.org.apache.http.ProtocolException;
import com.fr.third.org.apache.http.StatusLine; import com.fr.third.org.apache.http.StatusLine;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.io.AbstractMessageParser; import com.fr.third.org.apache.http.impl.io.AbstractMessageParser;
import com.fr.third.org.apache.http.io.SessionInputBuffer; import com.fr.third.org.apache.http.io.SessionInputBuffer;
import com.fr.third.org.apache.http.message.LineParser; import com.fr.third.org.apache.http.message.LineParser;
@ -65,7 +66,7 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* @deprecated (4.2) use {@link DefaultHttpResponseParser} * @deprecated (4.2) use {@link DefaultHttpResponseParser}
*/ */
@Deprecated @Deprecated
@ThreadSafe // no public methods @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
public class DefaultResponseParser extends AbstractMessageParser<HttpMessage> { public class DefaultResponseParser extends AbstractMessageParser<HttpMessage> {
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/HttpConnPool.java

@ -75,6 +75,7 @@ class HttpConnPool extends AbstractConnPool<HttpRoute, OperatedClientConnection,
this.connOperator = connOperator; this.connOperator = connOperator;
} }
@Override
public OperatedClientConnection create(final HttpRoute route) throws IOException { public OperatedClientConnection create(final HttpRoute route) throws IOException {
return connOperator.createConnection(); return connOperator.createConnection();
} }

13
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionInputBuffer.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.conn;
import java.io.IOException; import java.io.IOException;
import com.fr.third.org.apache.http.Consts; import com.fr.third.org.apache.http.Consts;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.conn.Wire; import com.fr.third.org.apache.http.impl.conn.Wire;
import com.fr.third.org.apache.http.io.EofSensor; import com.fr.third.org.apache.http.io.EofSensor;
import com.fr.third.org.apache.http.io.HttpTransportMetrics; import com.fr.third.org.apache.http.io.HttpTransportMetrics;
@ -43,7 +44,7 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* *
* @deprecated (4.3) no longer used. * @deprecated (4.3) no longer used.
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor { public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor {
@ -76,10 +77,12 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
this(in, wire, null); this(in, wire, null);
} }
@Override
public boolean isDataAvailable(final int timeout) throws IOException { public boolean isDataAvailable(final int timeout) throws IOException {
return this.in.isDataAvailable(timeout); return this.in.isDataAvailable(timeout);
} }
@Override
public int read(final byte[] b, final int off, final int len) throws IOException { public int read(final byte[] b, final int off, final int len) throws IOException {
final int l = this.in.read(b, off, len); final int l = this.in.read(b, off, len);
if (this.wire.enabled() && l > 0) { if (this.wire.enabled() && l > 0) {
@ -88,6 +91,7 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
return l; return l;
} }
@Override
public int read() throws IOException { public int read() throws IOException {
final int l = this.in.read(); final int l = this.in.read();
if (this.wire.enabled() && l != -1) { if (this.wire.enabled() && l != -1) {
@ -96,6 +100,7 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
return l; return l;
} }
@Override
public int read(final byte[] b) throws IOException { public int read(final byte[] b) throws IOException {
final int l = this.in.read(b); final int l = this.in.read(b);
if (this.wire.enabled() && l > 0) { if (this.wire.enabled() && l > 0) {
@ -104,6 +109,7 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
return l; return l;
} }
@Override
public String readLine() throws IOException { public String readLine() throws IOException {
final String s = this.in.readLine(); final String s = this.in.readLine();
if (this.wire.enabled() && s != null) { if (this.wire.enabled() && s != null) {
@ -113,6 +119,7 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
return s; return s;
} }
@Override
public int readLine(final CharArrayBuffer buffer) throws IOException { public int readLine(final CharArrayBuffer buffer) throws IOException {
final int l = this.in.readLine(buffer); final int l = this.in.readLine(buffer);
if (this.wire.enabled() && l >= 0) { if (this.wire.enabled() && l >= 0) {
@ -124,10 +131,12 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer, EofSensor
return l; return l;
} }
@Override
public HttpTransportMetrics getMetrics() { public HttpTransportMetrics getMetrics() {
return this.in.getMetrics(); return this.in.getMetrics();
} }
@Override
public boolean isEof() { public boolean isEof() {
if (this.eofSensor != null) { if (this.eofSensor != null) {
return this.eofSensor.isEof(); return this.eofSensor.isEof();

12
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.conn;
import java.io.IOException; import java.io.IOException;
import com.fr.third.org.apache.http.Consts; import com.fr.third.org.apache.http.Consts;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.conn.Wire; import com.fr.third.org.apache.http.impl.conn.Wire;
import com.fr.third.org.apache.http.io.HttpTransportMetrics; import com.fr.third.org.apache.http.io.HttpTransportMetrics;
import com.fr.third.org.apache.http.io.SessionOutputBuffer; import com.fr.third.org.apache.http.io.SessionOutputBuffer;
@ -40,7 +41,7 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* @since 4.0 * @since 4.0
* @deprecated (4.3) no longer used. * @deprecated (4.3) no longer used.
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class LoggingSessionOutputBuffer implements SessionOutputBuffer { public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
@ -70,6 +71,7 @@ public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
this(out, wire, null); this(out, wire, null);
} }
@Override
public void write(final byte[] b, final int off, final int len) throws IOException { public void write(final byte[] b, final int off, final int len) throws IOException {
this.out.write(b, off, len); this.out.write(b, off, len);
if (this.wire.enabled()) { if (this.wire.enabled()) {
@ -77,6 +79,7 @@ public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
} }
} }
@Override
public void write(final int b) throws IOException { public void write(final int b) throws IOException {
this.out.write(b); this.out.write(b);
if (this.wire.enabled()) { if (this.wire.enabled()) {
@ -84,6 +87,7 @@ public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
} }
} }
@Override
public void write(final byte[] b) throws IOException { public void write(final byte[] b) throws IOException {
this.out.write(b); this.out.write(b);
if (this.wire.enabled()) { if (this.wire.enabled()) {
@ -91,10 +95,12 @@ public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
} }
} }
@Override
public void flush() throws IOException { public void flush() throws IOException {
this.out.flush(); this.out.flush();
} }
@Override
public void writeLine(final CharArrayBuffer buffer) throws IOException { public void writeLine(final CharArrayBuffer buffer) throws IOException {
this.out.writeLine(buffer); this.out.writeLine(buffer);
if (this.wire.enabled()) { if (this.wire.enabled()) {
@ -104,6 +110,7 @@ public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
} }
} }
@Override
public void writeLine(final String s) throws IOException { public void writeLine(final String s) throws IOException {
this.out.writeLine(s); this.out.writeLine(s);
if (this.wire.enabled()) { if (this.wire.enabled()) {
@ -112,6 +119,7 @@ public class LoggingSessionOutputBuffer implements SessionOutputBuffer {
} }
} }
@Override
public HttpTransportMetrics getMetrics() { public HttpTransportMetrics getMetrics() {
return this.out.getMetrics(); return this.out.getMetrics();
} }

37
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/ManagedClientConnectionImpl.java

@ -41,7 +41,6 @@ import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.org.apache.http.HttpResponse;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.ManagedClientConnection; import com.fr.third.org.apache.http.conn.ManagedClientConnection;
@ -59,7 +58,6 @@ import com.fr.third.org.apache.http.util.Asserts;
* @deprecated (4.3) use {@link ManagedHttpClientConnectionFactory}. * @deprecated (4.3) use {@link ManagedHttpClientConnectionFactory}.
*/ */
@Deprecated @Deprecated
@NotThreadSafe
class ManagedClientConnectionImpl implements ManagedClientConnection { class ManagedClientConnectionImpl implements ManagedClientConnection {
private final ClientConnectionManager manager; private final ClientConnectionManager manager;
@ -83,6 +81,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
this.duration = Long.MAX_VALUE; this.duration = Long.MAX_VALUE;
} }
@Override
public String getId() { public String getId() {
return null; return null;
} }
@ -125,6 +124,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
return local; return local;
} }
@Override
public void close() throws IOException { public void close() throws IOException {
final HttpPoolEntry local = this.poolEntry; final HttpPoolEntry local = this.poolEntry;
if (local != null) { if (local != null) {
@ -134,6 +134,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void shutdown() throws IOException { public void shutdown() throws IOException {
final HttpPoolEntry local = this.poolEntry; final HttpPoolEntry local = this.poolEntry;
if (local != null) { if (local != null) {
@ -143,6 +144,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public boolean isOpen() { public boolean isOpen() {
final OperatedClientConnection conn = getConnection(); final OperatedClientConnection conn = getConnection();
if (conn != null) { if (conn != null) {
@ -152,6 +154,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public boolean isStale() { public boolean isStale() {
final OperatedClientConnection conn = getConnection(); final OperatedClientConnection conn = getConnection();
if (conn != null) { if (conn != null) {
@ -161,88 +164,105 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void setSocketTimeout(final int timeout) { public void setSocketTimeout(final int timeout) {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
conn.setSocketTimeout(timeout); conn.setSocketTimeout(timeout);
} }
@Override
public int getSocketTimeout() { public int getSocketTimeout() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getSocketTimeout(); return conn.getSocketTimeout();
} }
@Override
public HttpConnectionMetrics getMetrics() { public HttpConnectionMetrics getMetrics() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getMetrics(); return conn.getMetrics();
} }
@Override
public void flush() throws IOException { public void flush() throws IOException {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
conn.flush(); conn.flush();
} }
@Override
public boolean isResponseAvailable(final int timeout) throws IOException { public boolean isResponseAvailable(final int timeout) throws IOException {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.isResponseAvailable(timeout); return conn.isResponseAvailable(timeout);
} }
@Override
public void receiveResponseEntity( public void receiveResponseEntity(
final HttpResponse response) throws HttpException, IOException { final HttpResponse response) throws HttpException, IOException {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
conn.receiveResponseEntity(response); conn.receiveResponseEntity(response);
} }
@Override
public HttpResponse receiveResponseHeader() throws HttpException, IOException { public HttpResponse receiveResponseHeader() throws HttpException, IOException {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.receiveResponseHeader(); return conn.receiveResponseHeader();
} }
@Override
public void sendRequestEntity( public void sendRequestEntity(
final HttpEntityEnclosingRequest request) throws HttpException, IOException { final HttpEntityEnclosingRequest request) throws HttpException, IOException {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
conn.sendRequestEntity(request); conn.sendRequestEntity(request);
} }
@Override
public void sendRequestHeader( public void sendRequestHeader(
final HttpRequest request) throws HttpException, IOException { final HttpRequest request) throws HttpException, IOException {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
conn.sendRequestHeader(request); conn.sendRequestHeader(request);
} }
@Override
public InetAddress getLocalAddress() { public InetAddress getLocalAddress() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getLocalAddress(); return conn.getLocalAddress();
} }
@Override
public int getLocalPort() { public int getLocalPort() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getLocalPort(); return conn.getLocalPort();
} }
@Override
public InetAddress getRemoteAddress() { public InetAddress getRemoteAddress() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getRemoteAddress(); return conn.getRemoteAddress();
} }
@Override
public int getRemotePort() { public int getRemotePort() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getRemotePort(); return conn.getRemotePort();
} }
@Override
public boolean isSecure() { public boolean isSecure() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.isSecure(); return conn.isSecure();
} }
@Override
public void bind(final Socket socket) throws IOException { public void bind(final Socket socket) throws IOException {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public Socket getSocket() { public Socket getSocket() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
return conn.getSocket(); return conn.getSocket();
} }
@Override
public SSLSession getSSLSession() { public SSLSession getSSLSession() {
final OperatedClientConnection conn = ensureConnection(); final OperatedClientConnection conn = ensureConnection();
SSLSession result = null; SSLSession result = null;
@ -278,11 +298,13 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public HttpRoute getRoute() { public HttpRoute getRoute() {
final HttpPoolEntry local = ensurePoolEntry(); final HttpPoolEntry local = ensurePoolEntry();
return local.getEffectiveRoute(); return local.getEffectiveRoute();
} }
@Override
public void open( public void open(
final HttpRoute route, final HttpRoute route,
final HttpContext context, final HttpContext context,
@ -320,6 +342,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void tunnelTarget( public void tunnelTarget(
final boolean secure, final HttpParams params) throws IOException { final boolean secure, final HttpParams params) throws IOException {
Args.notNull(params, "HTTP parameters"); Args.notNull(params, "HTTP parameters");
@ -348,6 +371,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void tunnelProxy( public void tunnelProxy(
final HttpHost next, final boolean secure, final HttpParams params) throws IOException { final HttpHost next, final boolean secure, final HttpParams params) throws IOException {
Args.notNull(next, "Next proxy"); Args.notNull(next, "Next proxy");
@ -374,6 +398,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void layerProtocol( public void layerProtocol(
final HttpContext context, final HttpParams params) throws IOException { final HttpContext context, final HttpParams params) throws IOException {
Args.notNull(params, "HTTP parameters"); Args.notNull(params, "HTTP parameters");
@ -402,28 +427,34 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public Object getState() { public Object getState() {
final HttpPoolEntry local = ensurePoolEntry(); final HttpPoolEntry local = ensurePoolEntry();
return local.getState(); return local.getState();
} }
@Override
public void setState(final Object state) { public void setState(final Object state) {
final HttpPoolEntry local = ensurePoolEntry(); final HttpPoolEntry local = ensurePoolEntry();
local.setState(state); local.setState(state);
} }
@Override
public void markReusable() { public void markReusable() {
this.reusable = true; this.reusable = true;
} }
@Override
public void unmarkReusable() { public void unmarkReusable() {
this.reusable = false; this.reusable = false;
} }
@Override
public boolean isMarkedReusable() { public boolean isMarkedReusable() {
return this.reusable; return this.reusable;
} }
@Override
public void setIdleDuration(final long duration, final TimeUnit unit) { public void setIdleDuration(final long duration, final TimeUnit unit) {
if(duration > 0) { if(duration > 0) {
this.duration = unit.toMillis(duration); this.duration = unit.toMillis(duration);
@ -432,6 +463,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void releaseConnection() { public void releaseConnection() {
synchronized (this) { synchronized (this) {
if (this.poolEntry == null) { if (this.poolEntry == null) {
@ -442,6 +474,7 @@ class ManagedClientConnectionImpl implements ManagedClientConnection {
} }
} }
@Override
public void abortConnection() { public void abortConnection() {
synchronized (this) { synchronized (this) {
if (this.poolEntry == null) { if (this.poolEntry == null) {

21
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/PoolingClientConnectionManager.java

@ -35,7 +35,8 @@ import java.util.concurrent.TimeoutException;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.ClientConnectionRequest; import com.fr.third.org.apache.http.conn.ClientConnectionRequest;
@ -70,7 +71,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* @deprecated (4.3) use {@link PoolingHttpClientConnectionManager}. * @deprecated (4.3) use {@link PoolingHttpClientConnectionManager}.
*/ */
@Deprecated @Deprecated
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
public class PoolingClientConnectionManager implements ClientConnectionManager, ConnPoolControl<HttpRoute> { public class PoolingClientConnectionManager implements ClientConnectionManager, ConnPoolControl<HttpRoute> {
private final Log log = LogFactory.getLog(getClass()); private final Log log = LogFactory.getLog(getClass());
@ -139,6 +140,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
return new DefaultClientConnectionOperator(schreg, this.dnsResolver); return new DefaultClientConnectionOperator(schreg, this.dnsResolver);
} }
@Override
public SchemeRegistry getSchemeRegistry() { public SchemeRegistry getSchemeRegistry() {
return this.schemeRegistry; return this.schemeRegistry;
} }
@ -175,6 +177,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
return buf.toString(); return buf.toString();
} }
@Override
public ClientConnectionRequest requestConnection( public ClientConnectionRequest requestConnection(
final HttpRoute route, final HttpRoute route,
final Object state) { final Object state) {
@ -186,10 +189,12 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
return new ClientConnectionRequest() { return new ClientConnectionRequest() {
@Override
public void abortRequest() { public void abortRequest() {
future.cancel(true); future.cancel(true);
} }
@Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final long timeout,
final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException { final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
@ -228,6 +233,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
} }
} }
@Override
public void releaseConnection( public void releaseConnection(
final ManagedClientConnection conn, final long keepalive, final TimeUnit tunit) { final ManagedClientConnection conn, final long keepalive, final TimeUnit tunit) {
@ -272,6 +278,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
} }
} }
@Override
public void shutdown() { public void shutdown() {
this.log.debug("Connection manager is shutting down"); this.log.debug("Connection manager is shutting down");
try { try {
@ -282,6 +289,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
this.log.debug("Connection manager shut down"); this.log.debug("Connection manager shut down");
} }
@Override
public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) { public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) {
if (this.log.isDebugEnabled()) { if (this.log.isDebugEnabled()) {
this.log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit); this.log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit);
@ -289,39 +297,48 @@ public class PoolingClientConnectionManager implements ClientConnectionManager,
this.pool.closeIdle(idleTimeout, tunit); this.pool.closeIdle(idleTimeout, tunit);
} }
@Override
public void closeExpiredConnections() { public void closeExpiredConnections() {
this.log.debug("Closing expired connections"); this.log.debug("Closing expired connections");
this.pool.closeExpired(); this.pool.closeExpired();
} }
@Override
public int getMaxTotal() { public int getMaxTotal() {
return this.pool.getMaxTotal(); return this.pool.getMaxTotal();
} }
@Override
public void setMaxTotal(final int max) { public void setMaxTotal(final int max) {
this.pool.setMaxTotal(max); this.pool.setMaxTotal(max);
} }
@Override
public int getDefaultMaxPerRoute() { public int getDefaultMaxPerRoute() {
return this.pool.getDefaultMaxPerRoute(); return this.pool.getDefaultMaxPerRoute();
} }
@Override
public void setDefaultMaxPerRoute(final int max) { public void setDefaultMaxPerRoute(final int max) {
this.pool.setDefaultMaxPerRoute(max); this.pool.setDefaultMaxPerRoute(max);
} }
@Override
public int getMaxPerRoute(final HttpRoute route) { public int getMaxPerRoute(final HttpRoute route) {
return this.pool.getMaxPerRoute(route); return this.pool.getMaxPerRoute(route);
} }
@Override
public void setMaxPerRoute(final HttpRoute route, final int max) { public void setMaxPerRoute(final HttpRoute route, final int max) {
this.pool.setMaxPerRoute(route, max); this.pool.setMaxPerRoute(route, max);
} }
@Override
public PoolStats getTotalStats() { public PoolStats getTotalStats() {
return this.pool.getTotalStats(); return this.pool.getTotalStats();
} }
@Override
public PoolStats getStats(final HttpRoute route) { public PoolStats getStats(final HttpRoute route) {
return this.pool.getStats(route); return this.pool.getStats(route);
} }

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java

@ -39,7 +39,6 @@ import java.util.List;
import com.fr.third.org.apache.http.HttpException; import com.fr.third.org.apache.http.HttpException;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.conn.params.ConnRoutePNames; import com.fr.third.org.apache.http.conn.params.ConnRoutePNames;
import com.fr.third.org.apache.http.impl.conn.SystemDefaultRoutePlanner; import com.fr.third.org.apache.http.impl.conn.SystemDefaultRoutePlanner;
import com.fr.third.org.apache.http.conn.params.ConnRouteParams; import com.fr.third.org.apache.http.conn.params.ConnRouteParams;
@ -73,12 +72,11 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @deprecated (4.3) use {@link SystemDefaultRoutePlanner} * @deprecated (4.3) use {@link SystemDefaultRoutePlanner}
*/ */
@NotThreadSafe // e.g [gs]etProxySelector()
@Deprecated @Deprecated
public class ProxySelectorRoutePlanner implements HttpRoutePlanner { public class ProxySelectorRoutePlanner implements HttpRoutePlanner {
/** The scheme registry. */ /** The scheme registry. */
protected final SchemeRegistry schemeRegistry; // @ThreadSafe protected final SchemeRegistry schemeRegistry; // @Contract(threading = ThreadingBehavior.SAFE)
/** The proxy selector to use, or {@code null} for system default. */ /** The proxy selector to use, or {@code null} for system default. */
protected ProxySelector proxySelector; protected ProxySelector proxySelector;
@ -116,6 +114,7 @@ public class ProxySelectorRoutePlanner implements HttpRoutePlanner {
this.proxySelector = prosel; this.proxySelector = prosel;
} }
@Override
public HttpRoute determineRoute(final HttpHost target, public HttpRoute determineRoute(final HttpHost target,
final HttpRequest request, final HttpRequest request,
final HttpContext context) final HttpContext context)

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SchemeRegistryFactory.java

@ -26,7 +26,8 @@
*/ */
package com.fr.third.org.apache.http.impl.conn; package com.fr.third.org.apache.http.impl.conn;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.client.HttpClientBuilder; import com.fr.third.org.apache.http.impl.client.HttpClientBuilder;
import com.fr.third.org.apache.http.conn.scheme.PlainSocketFactory; import com.fr.third.org.apache.http.conn.scheme.PlainSocketFactory;
import com.fr.third.org.apache.http.conn.scheme.Scheme; import com.fr.third.org.apache.http.conn.scheme.Scheme;
@ -38,7 +39,7 @@ import com.fr.third.org.apache.http.conn.ssl.SSLSocketFactory;
* *
* @deprecated (4.3) use {@link HttpClientBuilder}. * @deprecated (4.3) use {@link HttpClientBuilder}.
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
public final class SchemeRegistryFactory { public final class SchemeRegistryFactory {

18
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/SingleClientConnManager.java

@ -32,8 +32,8 @@ import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.annotation.GuardedBy; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.ClientConnectionRequest; import com.fr.third.org.apache.http.conn.ClientConnectionRequest;
@ -61,7 +61,7 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @deprecated (4.2) use {@link BasicClientConnectionManager} * @deprecated (4.2) use {@link BasicClientConnectionManager}
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
public class SingleClientConnManager implements ClientConnectionManager { public class SingleClientConnManager implements ClientConnectionManager {
@ -82,19 +82,15 @@ public class SingleClientConnManager implements ClientConnectionManager {
protected final boolean alwaysShutDown; protected final boolean alwaysShutDown;
/** The one and only entry in this pool. */ /** The one and only entry in this pool. */
@GuardedBy("this")
protected volatile PoolEntry uniquePoolEntry; protected volatile PoolEntry uniquePoolEntry;
/** The currently issued managed connection, if any. */ /** The currently issued managed connection, if any. */
@GuardedBy("this")
protected volatile ConnAdapter managedConn; protected volatile ConnAdapter managedConn;
/** The time of the last connection release, or -1. */ /** The time of the last connection release, or -1. */
@GuardedBy("this")
protected volatile long lastReleaseTime; protected volatile long lastReleaseTime;
/** The time the last released connection expires and shouldn't be reused. */ /** The time the last released connection expires and shouldn't be reused. */
@GuardedBy("this")
protected volatile long connectionExpiresTime; protected volatile long connectionExpiresTime;
/** Indicates whether this connection manager is shut down. */ /** Indicates whether this connection manager is shut down. */
@ -145,6 +141,7 @@ public class SingleClientConnManager implements ClientConnectionManager {
} }
} }
@Override
public SchemeRegistry getSchemeRegistry() { public SchemeRegistry getSchemeRegistry() {
return this.schemeRegistry; return this.schemeRegistry;
} }
@ -175,16 +172,19 @@ public class SingleClientConnManager implements ClientConnectionManager {
Asserts.check(!this.isShutDown, "Manager is shut down"); Asserts.check(!this.isShutDown, "Manager is shut down");
} }
@Override
public final ClientConnectionRequest requestConnection( public final ClientConnectionRequest requestConnection(
final HttpRoute route, final HttpRoute route,
final Object state) { final Object state) {
return new ClientConnectionRequest() { return new ClientConnectionRequest() {
@Override
public void abortRequest() { public void abortRequest() {
// Nothing to abort, since requests are immediate. // Nothing to abort, since requests are immediate.
} }
@Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final TimeUnit tunit) { final long timeout, final TimeUnit tunit) {
return SingleClientConnManager.this.getConnection( return SingleClientConnManager.this.getConnection(
@ -253,6 +253,7 @@ public class SingleClientConnManager implements ClientConnectionManager {
} }
} }
@Override
public void releaseConnection( public void releaseConnection(
final ManagedClientConnection conn, final ManagedClientConnection conn,
final long validDuration, final TimeUnit timeUnit) { final long validDuration, final TimeUnit timeUnit) {
@ -307,6 +308,7 @@ public class SingleClientConnManager implements ClientConnectionManager {
} }
} }
@Override
public void closeExpiredConnections() { public void closeExpiredConnections() {
final long time = connectionExpiresTime; final long time = connectionExpiresTime;
if (System.currentTimeMillis() >= time) { if (System.currentTimeMillis() >= time) {
@ -314,6 +316,7 @@ public class SingleClientConnManager implements ClientConnectionManager {
} }
} }
@Override
public void closeIdleConnections(final long idletime, final TimeUnit tunit) { public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
assertStillUp(); assertStillUp();
@ -336,6 +339,7 @@ public class SingleClientConnManager implements ClientConnectionManager {
} }
} }
@Override
public void shutdown() { public void shutdown() {
this.isShutDown = true; this.isShutDown = true;
synchronized (this) { synchronized (this) {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/AbstractConnPool.java

@ -38,7 +38,6 @@ import java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.annotation.GuardedBy;
import com.fr.third.org.apache.http.conn.ConnectionPoolTimeoutException; import com.fr.third.org.apache.http.conn.ConnectionPoolTimeoutException;
import com.fr.third.org.apache.http.conn.OperatedClientConnection; import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.conn.routing.HttpRoute; import com.fr.third.org.apache.http.conn.routing.HttpRoute;
@ -66,12 +65,8 @@ public abstract class AbstractConnPool {
*/ */
protected final Lock poolLock; protected final Lock poolLock;
/** References to issued connections */
@GuardedBy("poolLock")
protected Set<BasicPoolEntry> leasedConnections; protected Set<BasicPoolEntry> leasedConnections;
/** The current total number of connections. */
@GuardedBy("poolLock")
protected int numConnections; protected int numConnections;
/** Indicates whether this pool is shut down. */ /** Indicates whether this pool is shut down. */

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/BasicPoolEntryRef.java

@ -45,7 +45,7 @@ import com.fr.third.org.apache.http.util.Args;
public class BasicPoolEntryRef extends WeakReference<BasicPoolEntry> { public class BasicPoolEntryRef extends WeakReference<BasicPoolEntry> {
/** The planned route of the entry. */ /** The planned route of the entry. */
private final HttpRoute route; // HttpRoute is @Immutable private final HttpRoute route; // HttpRoute is @Contract(threading = ThreadingBehavior.IMMUTABLE)
/** /**

2
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java

@ -282,6 +282,7 @@ public class ConnPoolByRoute extends AbstractConnPool {
return new PoolEntryRequest() { return new PoolEntryRequest() {
@Override
public void abortRequest() { public void abortRequest() {
poolLock.lock(); poolLock.lock();
try { try {
@ -291,6 +292,7 @@ public class ConnPoolByRoute extends AbstractConnPool {
} }
} }
@Override
public BasicPoolEntry getPoolEntry( public BasicPoolEntry getPoolEntry(
final long timeout, final long timeout,
final TimeUnit tunit) final TimeUnit tunit)

1
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java

@ -85,6 +85,7 @@ public class RouteSpecificPool {
this.route = route; this.route = route;
this.maxEntries = maxEntries; this.maxEntries = maxEntries;
this.connPerRoute = new ConnPerRoute() { this.connPerRoute = new ConnPerRoute() {
@Override
public int getMaxForRoute(final HttpRoute unused) { public int getMaxForRoute(final HttpRoute unused) {
return RouteSpecificPool.this.maxEntries; return RouteSpecificPool.this.maxEntries;
} }

19
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java

@ -33,7 +33,8 @@ import com.fr.third.org.apache.http.conn.OperatedClientConnection;
import com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import com.fr.third.org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.ClientConnectionManager; import com.fr.third.org.apache.http.conn.ClientConnectionManager;
import com.fr.third.org.apache.http.conn.ClientConnectionOperator; import com.fr.third.org.apache.http.conn.ClientConnectionOperator;
import com.fr.third.org.apache.http.conn.ClientConnectionRequest; import com.fr.third.org.apache.http.conn.ClientConnectionRequest;
@ -68,14 +69,14 @@ import com.fr.third.org.apache.http.util.Asserts;
* *
* @deprecated (4.2) use {@link PoolingHttpClientConnectionManager} * @deprecated (4.2) use {@link PoolingHttpClientConnectionManager}
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Deprecated @Deprecated
public class ThreadSafeClientConnManager implements ClientConnectionManager { public class ThreadSafeClientConnManager implements ClientConnectionManager {
private final Log log; private final Log log;
/** The schemes supported by this connection manager. */ /** The schemes supported by this connection manager. */
protected final SchemeRegistry schemeRegistry; // @ThreadSafe protected final SchemeRegistry schemeRegistry; // @Contract(threading = ThreadingBehavior.SAFE)
protected final AbstractConnPool connectionPool; protected final AbstractConnPool connectionPool;
@ -83,7 +84,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
protected final ConnPoolByRoute pool; protected final ConnPoolByRoute pool;
/** The operator for opening and updating connections. */ /** The operator for opening and updating connections. */
protected final ClientConnectionOperator connOperator; // DefaultClientConnectionOperator is @ThreadSafe protected final ClientConnectionOperator connOperator; // DefaultClientConnectionOperator is @Contract(threading = ThreadingBehavior.SAFE)
protected final ConnPerRouteBean connPerRoute; protected final ConnPerRouteBean connPerRoute;
@ -208,13 +209,15 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
protected ClientConnectionOperator protected ClientConnectionOperator
createConnectionOperator(final SchemeRegistry schreg) { createConnectionOperator(final SchemeRegistry schreg) {
return new DefaultClientConnectionOperator(schreg);// @ThreadSafe return new DefaultClientConnectionOperator(schreg);// @Contract(threading = ThreadingBehavior.SAFE)
} }
@Override
public SchemeRegistry getSchemeRegistry() { public SchemeRegistry getSchemeRegistry() {
return this.schemeRegistry; return this.schemeRegistry;
} }
@Override
public ClientConnectionRequest requestConnection( public ClientConnectionRequest requestConnection(
final HttpRoute route, final HttpRoute route,
final Object state) { final Object state) {
@ -224,10 +227,12 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
return new ClientConnectionRequest() { return new ClientConnectionRequest() {
@Override
public void abortRequest() { public void abortRequest() {
poolRequest.abortRequest(); poolRequest.abortRequest();
} }
@Override
public ManagedClientConnection getConnection( public ManagedClientConnection getConnection(
final long timeout, final TimeUnit tunit) throws InterruptedException, final long timeout, final TimeUnit tunit) throws InterruptedException,
ConnectionPoolTimeoutException { ConnectionPoolTimeoutException {
@ -245,6 +250,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
} }
@Override
public void releaseConnection(final ManagedClientConnection conn, final long validDuration, final TimeUnit timeUnit) { public void releaseConnection(final ManagedClientConnection conn, final long validDuration, final TimeUnit timeUnit) {
Args.check(conn instanceof BasicPooledConnAdapter, "Connection class mismatch, " + Args.check(conn instanceof BasicPooledConnAdapter, "Connection class mismatch, " +
"connection not obtained from this manager"); "connection not obtained from this manager");
@ -290,6 +296,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
} }
} }
@Override
public void shutdown() { public void shutdown() {
log.debug("Shutting down"); log.debug("Shutting down");
pool.shutdown(); pool.shutdown();
@ -321,6 +328,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
return pool.getConnectionsInPool(); return pool.getConnectionsInPool();
} }
@Override
public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) { public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit); log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit);
@ -328,6 +336,7 @@ public class ThreadSafeClientConnManager implements ClientConnectionManager {
pool.closeIdleConnections(idleTimeout, tunit); pool.closeIdleConnections(idleTimeout, tunit);
} }
@Override
public void closeExpiredConnections() { public void closeExpiredConnections() {
log.debug("Closing expired connections"); log.debug("Closing expired connections");
pool.closeExpiredConnections(); pool.closeExpiredConnections();

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpec.java

@ -27,7 +27,8 @@
package com.fr.third.org.apache.http.impl.cookie; package com.fr.third.org.apache.http.impl.cookie;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpec; import com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpec;
/** /**
@ -38,7 +39,7 @@ import com.fr.third.org.apache.http.impl.cookie.DefaultCookieSpec;
* *
* @since 4.0 * @since 4.0
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
public class BestMatchSpec extends DefaultCookieSpec { public class BestMatchSpec extends DefaultCookieSpec {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BestMatchSpecFactory.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
@ -46,7 +47,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class BestMatchSpecFactory implements CookieSpecFactory, CookieSpecProvider { public class BestMatchSpecFactory implements CookieSpecFactory, CookieSpecProvider {

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpec.java

@ -36,7 +36,8 @@ import com.fr.third.org.apache.http.FormattedHeader;
import com.fr.third.org.apache.http.Header; import com.fr.third.org.apache.http.Header;
import com.fr.third.org.apache.http.HeaderElement; import com.fr.third.org.apache.http.HeaderElement;
import com.fr.third.org.apache.http.NameValuePair; import com.fr.third.org.apache.http.NameValuePair;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.client.utils.DateUtils; import com.fr.third.org.apache.http.client.utils.DateUtils;
import com.fr.third.org.apache.http.cookie.Cookie; import com.fr.third.org.apache.http.cookie.Cookie;
import com.fr.third.org.apache.http.cookie.CookieAttributeHandler; import com.fr.third.org.apache.http.cookie.CookieAttributeHandler;
@ -60,7 +61,8 @@ import com.fr.third.org.apache.http.util.CharArrayBuffer;
* *
* @since 4.0 * @since 4.0
*/ */
@ThreadSafe @Deprecated
@Contract(threading = ThreadingBehavior.SAFE)
public class BrowserCompatSpec extends CookieSpecBase { public class BrowserCompatSpec extends CookieSpecBase {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
@ -46,7 +47,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class BrowserCompatSpecFactory implements CookieSpecFactory, CookieSpecProvider { public class BrowserCompatSpecFactory implements CookieSpecFactory, CookieSpecProvider {

6
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/BrowserCompatVersionAttributeHandler.java

@ -27,7 +27,8 @@
package com.fr.third.org.apache.http.impl.cookie; package com.fr.third.org.apache.http.impl.cookie;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.ClientCookie; import com.fr.third.org.apache.http.cookie.ClientCookie;
import com.fr.third.org.apache.http.cookie.CommonCookieAttributeHandler; import com.fr.third.org.apache.http.cookie.CommonCookieAttributeHandler;
import com.fr.third.org.apache.http.cookie.MalformedCookieException; import com.fr.third.org.apache.http.cookie.MalformedCookieException;
@ -42,7 +43,8 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.3 * @since 4.3
*/ */
@Immutable @Deprecated
@Contract(threading = ThreadingBehavior.IMMUTABLE)
public class BrowserCompatVersionAttributeHandler extends public class BrowserCompatVersionAttributeHandler extends
AbstractCookieAttributeHandler implements CommonCookieAttributeHandler { AbstractCookieAttributeHandler implements CommonCookieAttributeHandler {

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/DateParseException.java

@ -27,8 +27,6 @@
package com.fr.third.org.apache.http.impl.cookie; package com.fr.third.org.apache.http.impl.cookie;
import com.fr.third.org.apache.http.annotation.Immutable;
/** /**
* An exception to indicate an error parsing a date string. * An exception to indicate an error parsing a date string.
* *
@ -40,7 +38,6 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* @deprecated (4.3) no longer used. * @deprecated (4.3) no longer used.
*/ */
@Deprecated @Deprecated
@Immutable
public class DateParseException extends Exception { public class DateParseException extends Exception {
private static final long serialVersionUID = 4417696455000643370L; private static final long serialVersionUID = 4417696455000643370L;

3
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/DateUtils.java

@ -30,8 +30,6 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.util.Date; import java.util.Date;
import java.util.TimeZone; import java.util.TimeZone;
import com.fr.third.org.apache.http.annotation.Immutable;
/** /**
* A utility class for parsing and formatting HTTP dates as used in cookies and * A utility class for parsing and formatting HTTP dates as used in cookies and
* other headers. This class handles dates as defined by RFC 2616 section * other headers. This class handles dates as defined by RFC 2616 section
@ -43,7 +41,6 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* @deprecated (4.3) Use {@link com.fr.third.org.apache.http.client.utils.DateUtils}. * @deprecated (4.3) Use {@link com.fr.third.org.apache.http.client.utils.DateUtils}.
*/ */
@Deprecated @Deprecated
@Immutable
public final class DateUtils { public final class DateUtils {
/** /**

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/IgnoreSpecFactory.java

@ -27,7 +27,8 @@
package com.fr.third.org.apache.http.impl.cookie; package com.fr.third.org.apache.http.impl.cookie;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
@ -43,7 +44,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.1 * @since 4.1
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class IgnoreSpecFactory implements CookieSpecFactory, CookieSpecProvider { public class IgnoreSpecFactory implements CookieSpecFactory, CookieSpecProvider {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
@ -48,7 +49,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class NetscapeDraftSpecFactory implements CookieSpecFactory, CookieSpecProvider { public class NetscapeDraftSpecFactory implements CookieSpecFactory, CookieSpecProvider {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/PublicSuffixListParser.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.conn.util.PublicSuffixList; import com.fr.third.org.apache.http.conn.util.PublicSuffixList;
/** /**
@ -40,7 +41,7 @@ import com.fr.third.org.apache.http.conn.util.PublicSuffixList;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class PublicSuffixListParser { public class PublicSuffixListParser {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2109SpecFactory.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
@ -48,7 +49,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class RFC2109SpecFactory implements CookieSpecFactory, CookieSpecProvider { public class RFC2109SpecFactory implements CookieSpecFactory, CookieSpecProvider {

5
fine-httpcomponents/http-client/httpclient/src/main/java-deprecated/com/fr/third/org/apache/http/impl/cookie/RFC2965SpecFactory.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.impl.cookie;
import java.util.Collection; import java.util.Collection;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.cookie.CookieSpec; import com.fr.third.org.apache.http.cookie.CookieSpec;
import com.fr.third.org.apache.http.cookie.CookieSpecFactory; import com.fr.third.org.apache.http.cookie.CookieSpecFactory;
import com.fr.third.org.apache.http.cookie.CookieSpecProvider; import com.fr.third.org.apache.http.cookie.CookieSpecProvider;
@ -48,7 +49,7 @@ import com.fr.third.org.apache.http.protocol.HttpContext;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
@Deprecated @Deprecated
public class RFC2965SpecFactory implements CookieSpecFactory, CookieSpecProvider { public class RFC2965SpecFactory implements CookieSpecFactory, CookieSpecProvider {

3
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AUTH.java

@ -27,15 +27,12 @@
package com.fr.third.org.apache.http.auth; package com.fr.third.org.apache.http.auth;
import com.fr.third.org.apache.http.annotation.Immutable;
/** /**
* Constants and static helpers related to the HTTP authentication. * Constants and static helpers related to the HTTP authentication.
* *
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable
public final class AUTH { public final class AUTH {
/** /**

5
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthOption.java

@ -26,13 +26,14 @@
*/ */
package com.fr.third.org.apache.http.auth; package com.fr.third.org.apache.http.auth;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
* @since 4.2 * @since 4.2
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public final class AuthOption { public final class AuthOption {
private final AuthScheme authScheme; private final AuthScheme authScheme;

5
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthSchemeRegistry.java

@ -34,7 +34,8 @@ import java.util.concurrent.ConcurrentHashMap;
import com.fr.third.org.apache.http.config.Registry; import com.fr.third.org.apache.http.config.Registry;
import com.fr.third.org.apache.http.HttpRequest; import com.fr.third.org.apache.http.HttpRequest;
import com.fr.third.org.apache.http.annotation.ThreadSafe; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.config.Lookup; import com.fr.third.org.apache.http.config.Lookup;
import com.fr.third.org.apache.http.params.HttpParams; import com.fr.third.org.apache.http.params.HttpParams;
import com.fr.third.org.apache.http.protocol.ExecutionContext; import com.fr.third.org.apache.http.protocol.ExecutionContext;
@ -49,7 +50,7 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @deprecated (4.3) use {@link Registry} * @deprecated (4.3) use {@link Registry}
*/ */
@ThreadSafe @Contract(threading = ThreadingBehavior.SAFE)
@Deprecated @Deprecated
public final class AuthSchemeRegistry implements Lookup<AuthSchemeProvider> { public final class AuthSchemeRegistry implements Lookup<AuthSchemeProvider> {

5
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthScope.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.auth;
import java.util.Locale; import java.util.Locale;
import com.fr.third.org.apache.http.HttpHost; import com.fr.third.org.apache.http.HttpHost;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
import com.fr.third.org.apache.http.util.LangUtils; import com.fr.third.org.apache.http.util.LangUtils;
@ -42,7 +43,7 @@ import com.fr.third.org.apache.http.util.LangUtils;
* </p> * </p>
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class AuthScope { public class AuthScope {
/** /**

2
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthState.java

@ -28,7 +28,6 @@ package com.fr.third.org.apache.http.auth;
import java.util.Queue; import java.util.Queue;
import com.fr.third.org.apache.http.annotation.NotThreadSafe;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
/** /**
@ -36,7 +35,6 @@ import com.fr.third.org.apache.http.util.Args;
* *
* @since 4.0 * @since 4.0
*/ */
@NotThreadSafe
public class AuthState { public class AuthState {
/** Actual state of authentication protocol */ /** Actual state of authentication protocol */

2
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/AuthenticationException.java

@ -27,7 +27,6 @@
package com.fr.third.org.apache.http.auth; package com.fr.third.org.apache.http.auth;
import com.fr.third.org.apache.http.ProtocolException; import com.fr.third.org.apache.http.ProtocolException;
import com.fr.third.org.apache.http.annotation.Immutable;
/** /**
* Signals a failure in authentication process * Signals a failure in authentication process
@ -35,7 +34,6 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable
public class AuthenticationException extends ProtocolException { public class AuthenticationException extends ProtocolException {
private static final long serialVersionUID = -6794031905674764776L; private static final long serialVersionUID = -6794031905674764776L;

5
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/BasicUserPrincipal.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.auth;
import java.io.Serializable; import java.io.Serializable;
import java.security.Principal; import java.security.Principal;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import com.fr.third.org.apache.http.util.Args; import com.fr.third.org.apache.http.util.Args;
import com.fr.third.org.apache.http.util.LangUtils; import com.fr.third.org.apache.http.util.LangUtils;
@ -38,7 +39,7 @@ import com.fr.third.org.apache.http.util.LangUtils;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public final class BasicUserPrincipal implements Principal, Serializable { public final class BasicUserPrincipal implements Principal, Serializable {
private static final long serialVersionUID = -2266305184969850467L; private static final long serialVersionUID = -2266305184969850467L;

3
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/InvalidCredentialsException.java

@ -26,8 +26,6 @@
*/ */
package com.fr.third.org.apache.http.auth; package com.fr.third.org.apache.http.auth;
import com.fr.third.org.apache.http.annotation.Immutable;
/** /**
* Authentication credentials required to respond to a authentication * Authentication credentials required to respond to a authentication
* challenge are invalid * challenge are invalid
@ -35,7 +33,6 @@ import com.fr.third.org.apache.http.annotation.Immutable;
* *
* @since 4.0 * @since 4.0
*/ */
@Immutable
public class InvalidCredentialsException extends AuthenticationException { public class InvalidCredentialsException extends AuthenticationException {
private static final long serialVersionUID = -4834003835215460648L; private static final long serialVersionUID = -4834003835215460648L;

7
fine-httpcomponents/http-client/httpclient/src/main/java/com/fr/third/org/apache/http/auth/KerberosCredentials.java

@ -29,7 +29,8 @@ package com.fr.third.org.apache.http.auth;
import java.io.Serializable; import java.io.Serializable;
import java.security.Principal; import java.security.Principal;
import com.fr.third.org.apache.http.annotation.Immutable; import com.fr.third.org.apache.http.annotation.Contract;
import com.fr.third.org.apache.http.annotation.ThreadingBehavior;
import org.ietf.jgss.GSSCredential; import org.ietf.jgss.GSSCredential;
/** /**
@ -37,7 +38,7 @@ import org.ietf.jgss.GSSCredential;
* *
* @since 4.4 * @since 4.4
*/ */
@Immutable @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class KerberosCredentials implements Credentials, Serializable { public class KerberosCredentials implements Credentials, Serializable {
private static final long serialVersionUID = 487421613855550713L; private static final long serialVersionUID = 487421613855550713L;
@ -58,10 +59,12 @@ public class KerberosCredentials implements Credentials, Serializable {
return gssCredential; return gssCredential;
} }
@Override
public Principal getUserPrincipal() { public Principal getUserPrincipal() {
return null; return null;
} }
@Override
public String getPassword() { public String getPassword() {
return null; return null;
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save