diff --git a/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java b/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java index e2fd6104a..bb4be687a 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java +++ b/okhttp/src/main/java/com/squareup/okhttp/OkHttpClient.java @@ -40,7 +40,17 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import okio.ByteString; -/** Configures and creates HTTP connections. */ +/** + * Configures and creates HTTP connections. Most applications can use a single + * OkHttpClient for all of their HTTP requests - benefiting from a shared + * response cache, thread pool, connection re-use, etc. + * + * Instances of OkHttpClient are intended to be fully configured before they're + * shared - once shared they should be treated as immutable and can safely be used + * to concurrently open new connections. If required, threads can call + * {@link #clone()} to make a shallow copy of the OkHttpClient that can be + * safely modified with further configuration changes. + */ public final class OkHttpClient implements URLStreamHandlerFactory, Cloneable { private final RouteDatabase routeDatabase;