Better javadocs for simple message classes

This commit is contained in:
Oleg Kalnichevski 2021-03-14 20:37:08 +01:00
parent 567b53d4b1
commit e0c19c0b53
4 changed files with 30 additions and 0 deletions

View File

@ -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.
* <p>
* 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 {

View File

@ -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.
* <p>
* 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 {

View File

@ -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.
* <p>
* 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 {

View File

@ -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.
* <p>
* 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<SimpleHttpResponse, byte[]> {