hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r755789 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http: conn/params/ conn/routing/ impl/client/
Date Wed, 18 Mar 2009 23:47:46 GMT
Author: sebb
Date: Wed Mar 18 23:47:46 2009
New Revision: 755789

URL: http://svn.apache.org/viewvc?rev=755789&view=rev
Log:
Document classes which are not thread-safe currently

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RoutedRequest.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
Wed Mar 18 23:47:46 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.conn.params;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.params.HttpAbstractParamBean;
 import org.apache.http.params.HttpParams;
 
@@ -41,6 +43,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ConnConnectionParamBean extends HttpAbstractParamBean {
     
     public ConnConnectionParamBean (final HttpParams params) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
Wed Mar 18 23:47:46 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.conn.params;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.params.HttpAbstractParamBean;
 import org.apache.http.params.HttpParams;
 
@@ -41,6 +43,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ConnManagerParamBean extends HttpAbstractParamBean {
 
     public ConnManagerParamBean (final HttpParams params) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java
Wed Mar 18 23:47:46 2009
@@ -33,6 +33,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.conn.routing.HttpRoute;
 
 /**
@@ -46,6 +48,7 @@
  * 
  * @since 4.0
  */
+@NotThreadSafe // maxPerHostMap and defaultMax
 public final class ConnPerRouteBean implements ConnPerRoute {
 
     /** The default maximum number of connections allowed per host */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
Wed Mar 18 23:47:46 2009
@@ -33,6 +33,8 @@
 
 import java.net.InetAddress;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.HttpHost;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.params.HttpAbstractParamBean;
@@ -45,6 +47,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ConnRouteParamBean extends HttpAbstractParamBean {
     
     public ConnRouteParamBean (final HttpParams params) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java
Wed Mar 18 23:47:46 2009
@@ -33,6 +33,8 @@
 
 import java.net.InetAddress;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.HttpHost;
 
 
@@ -46,6 +48,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe
 public final class RouteTracker implements RouteInfo, Cloneable {
 
     /** The target host to connect to. */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ClientParamsStack.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
Wed Mar 18 23:47:46 2009
@@ -32,6 +32,8 @@
 package org.apache.http.impl.client;
 
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.params.HttpParams;
@@ -76,6 +78,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class ClientParamsStack extends AbstractHttpParams {
 
     private final Log log = LogFactory.getLog(getClass());

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
Wed Mar 18 23:47:46 2009
@@ -39,6 +39,8 @@
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.ConnectionReuseStrategy;
@@ -103,6 +105,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // e.g. managedConn
 public class DefaultRequestDirector implements RequestDirector {
 
     private final Log log = LogFactory.getLog(getClass());
@@ -763,7 +766,7 @@
             }
         }
         
-        int status = response.getStatusLine().getStatusCode();
+        int status = response.getStatusLine().getStatusCode(); // can't be null
 
         if (status > 299) {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/EntityEnclosingRequestWrapper.java
Wed Mar 18 23:47:46 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.client;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
@@ -50,6 +52,7 @@
  * 
  * @since 4.0
  */
+@NotThreadSafe // e.g. [gs]etEntity()
 public class EntityEnclosingRequestWrapper extends RequestWrapper 
     implements HttpEntityEnclosingRequest {
     

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RedirectLocations.java
Wed Mar 18 23:47:46 2009
@@ -35,11 +35,14 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import net.jcip.annotations.NotThreadSafe;
+
 /**
  * A collection of URIs that were used as redirects.
  *
  * @since 4.0
  */
+@NotThreadSafe // HashSet is not synch.
 public class RedirectLocations {
 
     private final Set<URI> uris;

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RequestWrapper.java
Wed Mar 18 23:47:46 2009
@@ -34,6 +34,8 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.HttpRequest;
 import org.apache.http.ProtocolException;
 import org.apache.http.ProtocolVersion;
@@ -56,6 +58,7 @@
  * 
  * @since 4.0
  */
+@NotThreadSafe
 public class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
     
     private final HttpRequest original;

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RoutedRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RoutedRequest.java?rev=755789&r1=755788&r2=755789&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RoutedRequest.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/RoutedRequest.java
Wed Mar 18 23:47:46 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.client;
 
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.http.conn.routing.HttpRoute;
 
 
@@ -44,10 +46,11 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // RequestWrapper is @NotThreadSafe
 public class RoutedRequest {
 
-    protected final RequestWrapper request;
-    protected final HttpRoute route;
+    protected final RequestWrapper request; // @NotThreadSafe
+    protected final HttpRoute route; // @Immutable
 
     /**
      * Creates a new routed request.



Mime
View raw message