diff --git a/okhttp/src/main/java/com/squareup/okhttp/Dispatcher.java b/okhttp/src/main/java/com/squareup/okhttp/Dispatcher.java index 9868b165b..2f9c02710 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/Dispatcher.java +++ b/okhttp/src/main/java/com/squareup/okhttp/Dispatcher.java @@ -53,7 +53,6 @@ public final class Dispatcher { public synchronized Executor getExecutor() { if (executor == null) { - // TODO: name these threads, either here or in the job. executor = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS, new LinkedBlockingQueue()); } diff --git a/okhttp/src/main/java/com/squareup/okhttp/Failure.java b/okhttp/src/main/java/com/squareup/okhttp/Failure.java index b5c69c6e0..51ee2eae3 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/Failure.java +++ b/okhttp/src/main/java/com/squareup/okhttp/Failure.java @@ -17,9 +17,6 @@ package com.squareup.okhttp; /** * A failure attempting to retrieve an HTTP response. - * - *

Warning: Experimental OkHttp 2.0 API

- * This class is in beta. APIs are subject to change! */ public final class Failure { private final Request request; diff --git a/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java b/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java index c388c18c0..ef934328d 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java +++ b/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java @@ -342,10 +342,14 @@ public final class OkHttpClient implements URLStreamHandlerFactory, Cloneable { } /** - * Schedules {@code request} to be executed. + * Schedules {@code request} to be executed at some point in the future. The + * {@link #getDispatcher dispatcher} defines when the request will run: + * usually immediately unless there are several other requests currently being + * executed. * - *

Warning: Experimental OkHttp 2.0 API

- * This method is in beta. APIs are subject to change! + *

This client will later call back {@code responseReceiver} with either an + * HTTP response or a failure exception. If you {@link #cancel} a request + * before it completes the receiver will not be called back. */ public void enqueue(Request request, Response.Receiver responseReceiver) { dispatcher.enqueue(this, request, responseReceiver); @@ -353,10 +357,7 @@ public final class OkHttpClient implements URLStreamHandlerFactory, Cloneable { /** * Cancels all scheduled tasks tagged with {@code tag}. Requests that are already - * in flight might not be canceled. - * - *

Warning: Experimental OkHttp 2.0 API

- * This method is in beta. APIs are subject to change! + * complete cannot be canceled. */ public void cancel(Object tag) { dispatcher.cancel(tag); diff --git a/okhttp/src/main/java/com/squareup/okhttp/OkResponseCache.java b/okhttp/src/main/java/com/squareup/okhttp/OkResponseCache.java index 1ddeb9a53..05460f5ad 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/OkResponseCache.java +++ b/okhttp/src/main/java/com/squareup/okhttp/OkResponseCache.java @@ -21,9 +21,6 @@ import java.net.CacheRequest; /** * An extended response cache API. Unlike {@link java.net.ResponseCache}, this * interface supports conditional caching and statistics. - * - *

Warning: Experimental OkHttp 2.0 API

- * This class is in beta. APIs are subject to change! */ public interface OkResponseCache { Response get(Request request) throws IOException; diff --git a/okhttp/src/main/java/com/squareup/okhttp/Request.java b/okhttp/src/main/java/com/squareup/okhttp/Request.java index 5866af0f2..83c6fbb2d 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/Request.java +++ b/okhttp/src/main/java/com/squareup/okhttp/Request.java @@ -35,9 +35,6 @@ import java.util.List; /** * An HTTP request. Instances of this class are immutable if their {@link #body} * is null or itself immutable. - * - *

Warning: Experimental OkHttp 2.0 API

- * This class is in beta. APIs are subject to change! */ public final class Request { private final URL url; diff --git a/okhttp/src/main/java/com/squareup/okhttp/Response.java b/okhttp/src/main/java/com/squareup/okhttp/Response.java index 8026a78f6..cb3ecb87d 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/Response.java +++ b/okhttp/src/main/java/com/squareup/okhttp/Response.java @@ -41,9 +41,6 @@ import static com.squareup.okhttp.internal.Util.equal; * An HTTP response. Instances of this class are not immutable: the response * body is a one-shot value that may be consumed only once. All other properties * are immutable. - * - *

Warning: Experimental OkHttp 2.0 API

- * This class is in beta. APIs are subject to change! */ public final class Response { private final Request request;