diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java index 7ce1cc696..61d3a9f21 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java @@ -40,10 +40,17 @@ import org.apache.hc.core5.util.Args; /** * HTTP request that can enclose a body represented as a simple text string or an array of bytes. + *
+ * IMPORTANT: {@link SimpleHttpRequest}s are intended for simple scenarios where entities inclosed + * in requests are known to be small. It is generally recommended to use + * {@link org.apache.hc.core5.http.nio.support.AsyncRequestBuilder} and streaming + * {@link org.apache.hc.core5.http.nio.AsyncEntityProducer}s. * * @since 5.0 * * @see SimpleBody + * @see org.apache.hc.core5.http.nio.support.AsyncRequestBuilder + * @see org.apache.hc.core5.http.nio.AsyncEntityProducer */ public final class SimpleHttpRequest extends ConfigurableHttpRequest { diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java index bad41df2b..78416a9e7 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java @@ -37,10 +37,17 @@ import org.apache.hc.core5.util.Args; /** * HTTP response that can enclose a body represented as a simple text string or an array of bytes. + *
+ * IMPORTANT: {@link SimpleHttpResponse}s are intended for simple scenarios where entities inclosed + * in responses are known to be small. It is generally recommended to use streaming + * {@link org.apache.hc.core5.http.nio.AsyncResponseConsumer}s, for instance, such as based on + * {@link AbstractCharResponseConsumer} or {@link AbstractBinResponseConsumer}. * * @since 5.0 * * @see SimpleBody + * @see AbstractCharResponseConsumer + * @see AbstractBinResponseConsumer */ public final class SimpleHttpResponse extends BasicHttpResponse { diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleRequestProducer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleRequestProducer.java index d6e78a5f7..b084e8be5 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleRequestProducer.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleRequestProducer.java @@ -35,10 +35,18 @@ import org.apache.hc.core5.util.Args; /** * HTTP request producer that generates message data stream events based * on content of a {@link SimpleHttpRequest} instance. + *
+ * IMPORTANT: {@link SimpleHttpRequest}s are intended for simple scenarios where entities inclosed + * in requests are known to be small. It is generally recommended to use + * {@link org.apache.hc.core5.http.nio.support.AsyncRequestBuilder} and streaming + * {@link org.apache.hc.core5.http.nio.AsyncEntityProducer}s. * * @since 5.0 * * @see SimpleBody + * @see SimpleHttpRequest + * @see org.apache.hc.core5.http.nio.support.AsyncRequestBuilder + * @see org.apache.hc.core5.http.nio.AsyncEntityProducer */ public final class SimpleRequestProducer extends BasicRequestProducer { diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java index 75b73fbca..7f9dda6e9 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java @@ -38,10 +38,18 @@ import org.apache.hc.core5.http.protocol.HttpContext; /** * HTTP response consumer that generates a {@link SimpleHttpResponse} instance based on events * of an incoming data stream. + *
+ * IMPORTANT: {@link SimpleHttpResponse}s are intended for simple scenarios where entities inclosed
+ * in responses are known to be small. It is generally recommended to use streaming
+ * {@link org.apache.hc.core5.http.nio.AsyncResponseConsumer}s, for instance, such as based on
+ * {@link AbstractCharResponseConsumer} or {@link AbstractBinResponseConsumer}.
*
* @since 5.0
*
* @see SimpleBody
+ * @see SimpleHttpResponse
+ * @see AbstractCharResponseConsumer
+ * @see AbstractBinResponseConsumer
*/
public final class SimpleResponseConsumer extends AbstractAsyncResponseConsumer