1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-24 04:02:07 +03:00

Small docs fixes. Remove OkHttp 2 warnings.

This commit is contained in:
jwilson
2014-01-10 10:01:32 -05:00
parent 6c4a0f01ab
commit 9eb276043f
6 changed files with 8 additions and 20 deletions

View File

@@ -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<Runnable>());
}

View File

@@ -17,9 +17,6 @@ package com.squareup.okhttp;
/**
* A failure attempting to retrieve an HTTP response.
*
* <h3>Warning: Experimental OkHttp 2.0 API</h3>
* This class is in beta. APIs are subject to change!
*/
public final class Failure {
private final Request request;

View File

@@ -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.
*
* <h3>Warning: Experimental OkHttp 2.0 API</h3>
* This method is in beta. APIs are subject to change!
* <p>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.
*
* <h3>Warning: Experimental OkHttp 2.0 API</h3>
* This method is in beta. APIs are subject to change!
* complete cannot be canceled.
*/
public void cancel(Object tag) {
dispatcher.cancel(tag);

View File

@@ -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.
*
* <h3>Warning: Experimental OkHttp 2.0 API</h3>
* This class is in beta. APIs are subject to change!
*/
public interface OkResponseCache {
Response get(Request request) throws IOException;

View File

@@ -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.
*
* <h3>Warning: Experimental OkHttp 2.0 API</h3>
* This class is in beta. APIs are subject to change!
*/
public final class Request {
private final URL url;

View File

@@ -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.
*
* <h3>Warning: Experimental OkHttp 2.0 API</h3>
* This class is in beta. APIs are subject to change!
*/
public final class Response {
private final Request request;