Document classes which are not thread-safe currently
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@755789 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cdc4fc628b
commit
f3fdcc1a06
|
@ -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 @@ import org.apache.http.params.HttpParams;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public class ConnConnectionParamBean extends HttpAbstractParamBean {
|
||||
|
||||
public ConnConnectionParamBean (final HttpParams params) {
|
||||
|
|
|
@ -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 @@ import org.apache.http.params.HttpParams;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public class ConnManagerParamBean extends HttpAbstractParamBean {
|
||||
|
||||
public ConnManagerParamBean (final HttpParams params) {
|
||||
|
|
|
@ -33,6 +33,8 @@ package org.apache.http.conn.params;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.conn.routing.HttpRoute;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +48,7 @@ import org.apache.http.conn.routing.HttpRoute;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // maxPerHostMap and defaultMax
|
||||
public final class ConnPerRouteBean implements ConnPerRoute {
|
||||
|
||||
/** The default maximum number of connections allowed per host */
|
||||
|
|
|
@ -33,6 +33,8 @@ package org.apache.http.conn.params;
|
|||
|
||||
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 @@ import org.apache.http.params.HttpParams;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public class ConnRouteParamBean extends HttpAbstractParamBean {
|
||||
|
||||
public ConnRouteParamBean (final HttpParams params) {
|
||||
|
|
|
@ -33,6 +33,8 @@ package org.apache.http.conn.routing;
|
|||
|
||||
import java.net.InetAddress;
|
||||
|
||||
import net.jcip.annotations.NotThreadSafe;
|
||||
|
||||
import org.apache.http.HttpHost;
|
||||
|
||||
|
||||
|
@ -46,6 +48,7 @@ import org.apache.http.HttpHost;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public final class RouteTracker implements RouteInfo, Cloneable {
|
||||
|
||||
/** The target host to connect to. */
|
||||
|
|
|
@ -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 @@ import org.apache.http.params.AbstractHttpParams;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public class ClientParamsStack extends AbstractHttpParams {
|
||||
|
||||
private final Log log = LogFactory.getLog(getClass());
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.Locale;
|
|||
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 @@ import org.apache.http.protocol.HttpRequestExecutor;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // e.g. managedConn
|
||||
public class DefaultRequestDirector implements RequestDirector {
|
||||
|
||||
private final Log log = LogFactory.getLog(getClass());
|
||||
|
@ -763,7 +766,7 @@ public class DefaultRequestDirector implements RequestDirector {
|
|||
}
|
||||
}
|
||||
|
||||
int status = response.getStatusLine().getStatusCode();
|
||||
int status = response.getStatusLine().getStatusCode(); // can't be null
|
||||
|
||||
if (status > 299) {
|
||||
|
||||
|
|
|
@ -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 @@ import org.apache.http.protocol.HTTP;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe // e.g. [gs]etEntity()
|
||||
public class EntityEnclosingRequestWrapper extends RequestWrapper
|
||||
implements HttpEntityEnclosingRequest {
|
||||
|
||||
|
|
|
@ -35,11 +35,14 @@ import java.net.URI;
|
|||
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;
|
||||
|
|
|
@ -34,6 +34,8 @@ package org.apache.http.impl.client;
|
|||
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 @@ import org.apache.http.params.HttpProtocolParams;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
public class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
|
||||
|
||||
private final HttpRequest original;
|
||||
|
|
|
@ -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 @@ import org.apache.http.conn.routing.HttpRoute;
|
|||
*
|
||||
* @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.
|
||||
|
|
Loading…
Reference in New Issue