From c7af5017ae86714dab21f35512bdf25c0b595323 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 22 Aug 2024 10:53:37 -0400 Subject: [PATCH] Javadoc improvements - Fix @link tags. - Fix @since tag. - Add missing @throws tags. - Add missing @param tags for generics. - Add missing @return tags. - Sentences end in a period. - Fix typos. --- .../org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java | 5 +++-- .../http2/impl/nio/bootstrap/H2MultiplexingRequester.java | 2 ++ .../core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java | 1 + .../hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java | 5 +++++ .../java/org/apache/hc/core5/http2/nio/AsyncPingHandler.java | 2 ++ .../java/org/apache/hc/core5/http2/ssl/H2TlsSupport.java | 1 + .../apache/hc/core5/reactive/ReactiveRequestProcessor.java | 2 ++ .../org/apache/hc/core5/reactive/BasicDataStreamChannel.java | 3 +++ .../apache/hc/core5/testing/nio/MessageExchangeHandler.java | 1 + .../java/org/apache/hc/core5/concurrent/FutureCallback.java | 3 +-- .../main/java/org/apache/hc/core5/http/config/Lookup.java | 3 ++- .../main/java/org/apache/hc/core5/http/config/Registry.java | 1 + .../org/apache/hc/core5/http/config/RegistryBuilder.java | 1 + .../apache/hc/core5/http/impl/io/AbstractMessageParser.java | 2 ++ .../apache/hc/core5/http/impl/io/AbstractMessageWriter.java | 1 + .../apache/hc/core5/http/impl/nio/AbstractMessageParser.java | 1 + .../apache/hc/core5/http/impl/nio/AbstractMessageWriter.java | 3 ++- .../hc/core5/http/impl/nio/DefaultHttpRequestParser.java | 1 + .../hc/core5/http/impl/nio/DefaultHttpRequestWriter.java | 1 + .../hc/core5/http/impl/nio/DefaultHttpResponseParser.java | 1 + .../hc/core5/http/impl/nio/DefaultHttpResponseWriter.java | 1 + .../apache/hc/core5/http/io/HttpClientResponseHandler.java | 2 +- .../org/apache/hc/core5/http/io/HttpConnectionFactory.java | 1 + .../java/org/apache/hc/core5/http/io/HttpMessageParser.java | 3 +-- .../apache/hc/core5/http/io/HttpMessageParserFactory.java | 1 + .../java/org/apache/hc/core5/http/io/HttpMessageWriter.java | 1 + .../apache/hc/core5/http/io/HttpMessageWriterFactory.java | 1 + .../org/apache/hc/core5/http/nio/AsyncRequestConsumer.java | 2 +- .../java/org/apache/hc/core5/http/nio/DataStreamChannel.java | 2 +- .../org/apache/hc/core5/http/nio/NHttpMessageWriter.java | 1 + .../http/nio/support/AbstractServerExchangeHandler.java | 1 + .../core5/http/nio/support/BasicClientExchangeHandler.java | 1 + .../hc/core5/http/nio/support/BasicRequestConsumer.java | 1 + .../hc/core5/http/nio/support/BasicResponseConsumer.java | 1 + .../core5/http/nio/support/BasicServerExchangeHandler.java | 1 + .../apache/hc/core5/http/support/AbstractMessageBuilder.java | 1 + .../apache/hc/core5/http/support/AbstractRequestBuilder.java | 1 + .../hc/core5/http/support/AbstractResponseBuilder.java | 1 + .../src/main/java/org/apache/hc/core5/io/IOCallback.java | 1 + .../src/main/java/org/apache/hc/core5/io/SocketSupport.java | 4 +++- .../main/java/org/apache/hc/core5/pool/ConnPoolListener.java | 1 + .../main/java/org/apache/hc/core5/util/ReflectionUtils.java | 3 ++- .../src/main/java/org/apache/hc/core5/util/TimeValue.java | 1 + 43 files changed, 60 insertions(+), 13 deletions(-) diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java index c0557aecea..8708b07233 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java @@ -101,9 +101,8 @@ public void put(final ByteBuffer src) { * * @param src the source buffer or {@code null} if not available. * @param channel the underlying data channel. - * * @return a complete frame or {@code null} a complete frame cannot be read. - * + * @throws IOException in case of an I/O error. * @since 5.1 */ public RawFrame read(final ByteBuffer src, final ReadableByteChannel channel) throws IOException { @@ -190,6 +189,8 @@ public RawFrame read(final ByteBuffer src, final ReadableByteChannel channel) th * Attempts to read a complete frame from the underlying data channel. * * @param channel the underlying data channel. + * @return a complete frame or {@code null} a complete frame cannot be read. + * @throws IOException in case of an I/O error. */ public RawFrame read(final ReadableByteChannel channel) throws IOException { return read(null, channel); diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java index eeda4ae6fb..b08eff9a87 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java @@ -264,6 +264,7 @@ public void cancelled() { } /** + * @param The result type returned by the Future's {@code get} method. * @since 5.3 */ public final Future execute( @@ -304,6 +305,7 @@ public final Future execute( } /** + * @param The result type returned by the Future's {@code get} method. * @since 5.3 */ public final Future execute( diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java index dc5ac20819..c0ea93a0d7 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java @@ -324,6 +324,7 @@ public final H2RequesterBootstrap register(final String hostname, final String u } /** + * @return this instance. * @deprecated Use {@link #register(String, String, Supplier)}. */ @Deprecated diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java index ce5d246551..822cbe7f4a 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java @@ -317,6 +317,7 @@ public final H2ServerBootstrap registerVirtual(final String hostname, final Stri * Registers the given {@link AsyncServerRequestHandler} as a default handler for URIs * matching the given pattern. * + * @param request handler representation. * @param uriPattern the pattern to register the handler for. * @param requestHandler the handler. * @return this instance. @@ -332,6 +333,7 @@ public final H2ServerBootstrap register( * Registers the given {@link AsyncServerRequestHandler} as a handler for URIs * matching the given host and the pattern. * + * @param request handler representation. * @param hostname the host name * @param uriPattern the pattern to register the handler for. * @param requestHandler the handler. @@ -348,6 +350,7 @@ public final H2ServerBootstrap register( } /** + * @param request handler representation. * @return this instance. * @deprecated Use {@link #register(String, String, Supplier)}. */ @@ -361,6 +364,8 @@ public final H2ServerBootstrap registerVirtual( /** * Adds the filter before the filter with the given name. + * + * @return this instance. */ public final H2ServerBootstrap addFilterBefore(final String existing, final String name, final AsyncFilterHandler filterHandler) { Args.notBlank(existing, "Existing"); diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AsyncPingHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AsyncPingHandler.java index cf31bf565b..9978170a26 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AsyncPingHandler.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AsyncPingHandler.java @@ -49,6 +49,8 @@ public interface AsyncPingHandler { * Triggered to signal receipt of a ping response message. * * @param feedback the ping message feedback. + * @throws HttpException in case of HTTP protocol violation. + * @throws IOException in case of an I/O error. */ void consumeResponse(ByteBuffer feedback) throws HttpException, IOException; diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2TlsSupport.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2TlsSupport.java index 2d7b315423..735d13f179 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2TlsSupport.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2TlsSupport.java @@ -68,6 +68,7 @@ public static String[] selectApplicationProtocols(final Object attachment) { } /** + * @return the given SSLParameters. * @since 5.3 */ public static SSLParameters enforceRequirements( diff --git a/httpcore5-reactive/src/main/java/org/apache/hc/core5/reactive/ReactiveRequestProcessor.java b/httpcore5-reactive/src/main/java/org/apache/hc/core5/reactive/ReactiveRequestProcessor.java index e639be9200..a403114aad 100644 --- a/httpcore5-reactive/src/main/java/org/apache/hc/core5/reactive/ReactiveRequestProcessor.java +++ b/httpcore5-reactive/src/main/java/org/apache/hc/core5/reactive/ReactiveRequestProcessor.java @@ -54,6 +54,8 @@ public interface ReactiveRequestProcessor { * @param context the actual execution context. * @param requestBody a reactive stream representing the request body. * @param responseBodyCallback a callback to invoke with the response body, if any. + * @throws HttpException in case of HTTP protocol violation. + * @throws IOException in case of an I/O error. */ void processRequest( HttpRequest request, diff --git a/httpcore5-reactive/src/test/java/org/apache/hc/core5/reactive/BasicDataStreamChannel.java b/httpcore5-reactive/src/test/java/org/apache/hc/core5/reactive/BasicDataStreamChannel.java index 6510f040b0..6e5fd76b30 100644 --- a/httpcore5-reactive/src/test/java/org/apache/hc/core5/reactive/BasicDataStreamChannel.java +++ b/httpcore5-reactive/src/test/java/org/apache/hc/core5/reactive/BasicDataStreamChannel.java @@ -36,6 +36,9 @@ import java.util.ArrayList; import java.util.List; +/** + * Writes to a byte stream channel. + */ public class BasicDataStreamChannel implements DataStreamChannel { private final WritableByteChannel byteChannel; diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/MessageExchangeHandler.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/MessageExchangeHandler.java index ae7a8234cc..80339ed60b 100644 --- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/MessageExchangeHandler.java +++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/MessageExchangeHandler.java @@ -38,6 +38,7 @@ import org.apache.hc.core5.http.protocol.HttpContext; /** + * @param The message body type. * @since 5.0 */ public abstract class MessageExchangeHandler extends AbstractServerExchangeHandler> { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java b/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java index 646c1be09c..c286506a06 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java @@ -27,8 +27,7 @@ package org.apache.hc.core5.concurrent; /** - * A callback interface that gets invoked upon completion of - * a {@link concurrent.Future}. + * A callback interface that gets invoked upon completion of a {@link java.util.concurrent.Future}. * * @param the future result type returned by this callback. * @since 4.2 diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/config/Lookup.java b/httpcore5/src/main/java/org/apache/hc/core5/http/config/Lookup.java index ca80d75c55..3fcc66082c 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/config/Lookup.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/config/Lookup.java @@ -29,8 +29,9 @@ /** - * Generic lookup by low-case string ID. + * Generic lookup by lower-case string ID. * + * @param the type of values to lookup. * @since 4.3 */ public interface Lookup { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/config/Registry.java b/httpcore5/src/main/java/org/apache/hc/core5/http/config/Registry.java index c9d9ed81c4..ecd02092ea 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/config/Registry.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/config/Registry.java @@ -37,6 +37,7 @@ /** * Generic registry of items keyed by low-case string ID. * + * @param the type of values to lookup. * @since 4.3 */ @Contract(threading = ThreadingBehavior.SAFE) diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/config/RegistryBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/http/config/RegistryBuilder.java index 3f804b5221..af31c76821 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/config/RegistryBuilder.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/config/RegistryBuilder.java @@ -36,6 +36,7 @@ /** * Builder for {@link Registry} instances. * + * @param the type of Registry values. * @since 4.3 */ public final class RegistryBuilder { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java index db68c28e68..cf5e40d48b 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.InputStream; +import java.io.InterruptedIOException; import java.util.ArrayList; import java.util.List; @@ -49,6 +50,7 @@ * Abstract base class for HTTP message parsers that obtain input from * an instance of {@link org.apache.hc.core5.http.io.SessionInputBuffer}. * + * @param The type of {@link HttpMessage}. * @since 4.0 */ public abstract class AbstractMessageParser implements HttpMessageParser { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageWriter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageWriter.java index dcc6b0f8d8..6153aec3b8 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageWriter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageWriter.java @@ -46,6 +46,7 @@ * Abstract base class for HTTP message writers that serialize output to * an instance of {@link org.apache.hc.core5.http.io.SessionOutputBuffer}. * + * @param The type of {@link HttpMessage}. * @since 4.0 */ public abstract class AbstractMessageWriter implements HttpMessageWriter { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageParser.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageParser.java index 17fe3a2968..1582da3721 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageParser.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageParser.java @@ -46,6 +46,7 @@ * Abstract {@link NHttpMessageParser} that serves as a base for all message * parser implementations. * + * @param The type of {@link HttpMessage}. * @since 4.0 */ public abstract class AbstractMessageParser implements NHttpMessageParser { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageWriter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageWriter.java index f3c2823b5a..61c8239c62 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageWriter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageWriter.java @@ -36,8 +36,8 @@ import org.apache.hc.core5.http.HttpMessage; import org.apache.hc.core5.http.message.BasicLineFormatter; import org.apache.hc.core5.http.message.LineFormatter; -import org.apache.hc.core5.http.nio.SessionOutputBuffer; import org.apache.hc.core5.http.nio.NHttpMessageWriter; +import org.apache.hc.core5.http.nio.SessionOutputBuffer; import org.apache.hc.core5.util.Args; import org.apache.hc.core5.util.CharArrayBuffer; @@ -45,6 +45,7 @@ * Abstract {@link NHttpMessageWriter} that serves as a base for all message * writer implementations. * + * @param The type of {@link HttpMessage}. * @since 4.0 */ public abstract class AbstractMessageWriter implements NHttpMessageWriter { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestParser.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestParser.java index 67f5cffc89..3fd3ab724c 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestParser.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestParser.java @@ -44,6 +44,7 @@ /** * Default {@link org.apache.hc.core5.http.nio.NHttpMessageParser} implementation for {@link HttpRequest}s. * + * @param The type of {@link HttpRequest}. * @since 4.1 */ public class DefaultHttpRequestParser extends AbstractMessageParser { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestWriter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestWriter.java index b79a02ae1d..179dfa86fe 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestWriter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpRequestWriter.java @@ -39,6 +39,7 @@ /** * Default {@link org.apache.hc.core5.http.nio.NHttpMessageWriter} implementation for {@link HttpRequest}s. * + * @param The type of {@link HttpRequest}. * @since 4.1 */ public class DefaultHttpRequestWriter extends AbstractMessageWriter { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseParser.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseParser.java index 66a7b35282..405eba4cf2 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseParser.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseParser.java @@ -39,6 +39,7 @@ /** * Default {@link org.apache.hc.core5.http.nio.NHttpMessageParser} implementation for {@link HttpResponse}s. * + * @param The type of {@link HttpResponse}. * @since 4.1 */ public class DefaultHttpResponseParser extends AbstractMessageParser { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseWriter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseWriter.java index 80e3359ef6..7e2b37e261 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseWriter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/DefaultHttpResponseWriter.java @@ -39,6 +39,7 @@ /** * Default {@link org.apache.hc.core5.http.nio.NHttpMessageWriter} implementation for {@link HttpResponse}s. * + * @param The type of {@link HttpResponse}. * @since 4.1 */ public class DefaultHttpResponseWriter extends AbstractMessageWriter { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpClientResponseHandler.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpClientResponseHandler.java index 397ef2e2f4..5a97213472 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpClientResponseHandler.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpClientResponseHandler.java @@ -35,7 +35,7 @@ * Handler that encapsulates the process of generating a response object * from a {@link ClassicHttpResponse}. * - * + * @param the type of the response. * @since 4.0 */ @FunctionalInterface diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpConnectionFactory.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpConnectionFactory.java index ce12f68db8..2a390f0f6e 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpConnectionFactory.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpConnectionFactory.java @@ -37,6 +37,7 @@ /** * Factory for {@link HttpConnection} instances. * + * @param The type of {@link HttpConnection}. * @since 4.3 */ public interface HttpConnectionFactory { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParser.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParser.java index f9909fd7d3..6449927c6d 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParser.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParser.java @@ -36,8 +36,7 @@ /** * Message parser intended to build HTTP message head from an input stream. * - * @param - * {@link MessageHeaders} or a subclass + * @param The type of {@link MessageHeaders}. * * @since 4.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParserFactory.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParserFactory.java index 676368f49c..b6a1396534 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParserFactory.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageParserFactory.java @@ -33,6 +33,7 @@ /** * Factory for {@link HttpMessageParser} instances. * + * @param The type of {@link MessageHeaders}. * @since 4.3 */ public interface HttpMessageParserFactory { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriter.java index 026a040fcc..ee193d9161 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriter.java @@ -36,6 +36,7 @@ /** * Message writer intended to serialize HTTP message head to an output stream. * + * @param The type of {@link MessageHeaders}. * @since 4.0 */ public interface HttpMessageWriter { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriterFactory.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriterFactory.java index 544df602e7..83a7c41f1f 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriterFactory.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriterFactory.java @@ -32,6 +32,7 @@ /** * Factory for {@link HttpMessageWriter} instances. * + * @param The type of {@link MessageHeaders}. * @since 4.3 */ public interface HttpMessageWriterFactory { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestConsumer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestConsumer.java index 89f58a4ba8..fc7642bfc3 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestConsumer.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestConsumer.java @@ -37,7 +37,7 @@ /** * Abstract asynchronous request consumer. * - * @param request representation. + * @param the future result type returned for callbacks. * * @since 5.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/DataStreamChannel.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/DataStreamChannel.java index da0f74ac44..7424607d51 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/DataStreamChannel.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/DataStreamChannel.java @@ -36,7 +36,7 @@ import org.apache.hc.core5.http.Header; /** - * Abstract byte stream channel + * Abstract byte stream channel. *

* Implementations are expected to be thread-safe. *

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/NHttpMessageWriter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/NHttpMessageWriter.java index 55fa563031..434339ae31 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/NHttpMessageWriter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/NHttpMessageWriter.java @@ -35,6 +35,7 @@ /** * Message writer intended to serialize HTTP message head to a session buffer. * + * @param The type of {@link MessageHeaders}. * @since 4.0 */ public interface NHttpMessageWriter { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/AbstractServerExchangeHandler.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/AbstractServerExchangeHandler.java index 9607ae96dc..a596437913 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/AbstractServerExchangeHandler.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/AbstractServerExchangeHandler.java @@ -52,6 +52,7 @@ /** * Abstract server side message exchange handler. * + * @param the type of request messages. * @since 5.0 */ public abstract class AbstractServerExchangeHandler implements AsyncServerExchangeHandler { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java index 3296afcd93..586c21946b 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicClientExchangeHandler.java @@ -51,6 +51,7 @@ * of {@link AsyncRequestProducer} to generate request message * and {@link AsyncResponseConsumer} to process the response message returned by the server. * + * @param The result type. * @since 5.0 */ public final class BasicClientExchangeHandler implements AsyncClientExchangeHandler { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicRequestConsumer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicRequestConsumer.java index 3567c18b56..6f2c76377d 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicRequestConsumer.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicRequestConsumer.java @@ -49,6 +49,7 @@ * Basic implementation of {@link AsyncRequestConsumer} that represents the request message as * a {@link Message} and relies on a {@link AsyncEntityConsumer} to process request entity stream. * + * @param The message body type. * @since 5.0 */ public class BasicRequestConsumer implements AsyncRequestConsumer> { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicResponseConsumer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicResponseConsumer.java index be95f814cb..e3bb76db85 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicResponseConsumer.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicResponseConsumer.java @@ -50,6 +50,7 @@ * a {@link Message} and relies on a {@link AsyncEntityConsumer} to process response entity * stream. * + * @param The message body type. * @since 5.0 */ public class BasicResponseConsumer implements AsyncResponseConsumer> { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicServerExchangeHandler.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicServerExchangeHandler.java index 38aba92a80..c4143823f5 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicServerExchangeHandler.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/BasicServerExchangeHandler.java @@ -40,6 +40,7 @@ * Basic {@link AbstractServerExchangeHandler} implementation that delegates * request processing and response generation to a {@link AsyncServerRequestHandler}. * + * @param the type of request messages. * @since 5.0 */ public class BasicServerExchangeHandler extends AbstractServerExchangeHandler { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractMessageBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractMessageBuilder.java index 006e6b52f2..99db30a568 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractMessageBuilder.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractMessageBuilder.java @@ -38,6 +38,7 @@ /** * Abstract {@link HttpMessage} builder. * + * @param The message type to build. * @since 5.1 */ public abstract class AbstractMessageBuilder { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractRequestBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractRequestBuilder.java index be0b9ab7de..4692e20f32 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractRequestBuilder.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractRequestBuilder.java @@ -49,6 +49,7 @@ /** * Builder for {@link BasicHttpRequest} instances. * + * @param The request type to build. * @since 5.1 */ public abstract class AbstractRequestBuilder extends AbstractMessageBuilder { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractResponseBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractResponseBuilder.java index c5d942338d..f5252a625b 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractResponseBuilder.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/support/AbstractResponseBuilder.java @@ -34,6 +34,7 @@ /** * Builder for {@link BasicHttpRequest} instances. * + * @param The response type to build. * @since 5.1 */ public abstract class AbstractResponseBuilder extends AbstractMessageBuilder { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/io/IOCallback.java b/httpcore5/src/main/java/org/apache/hc/core5/io/IOCallback.java index 24fb294615..e2b19d69af 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/io/IOCallback.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/io/IOCallback.java @@ -32,6 +32,7 @@ /** * Abstract I/O callback. * + * @param the type of the input to the operation. * @since 5.0 */ public interface IOCallback { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/io/SocketSupport.java b/httpcore5/src/main/java/org/apache/hc/core5/io/SocketSupport.java index 4ae7ebb2b2..32942b008b 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/io/SocketSupport.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/io/SocketSupport.java @@ -56,7 +56,9 @@ public static SocketOption getExtendedSocketOptionOrNull(final String fie } /** - * object can be ServerSocket or Socket + * Object can be ServerSocket or Socket. + * + * @param ServerSocket or Socket. */ public static void setOption(final T object, final String fieldName, final T value) throws IOException { try { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/pool/ConnPoolListener.java b/httpcore5/src/main/java/org/apache/hc/core5/pool/ConnPoolListener.java index 11dc9ec8e8..4dce6e2cf3 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/pool/ConnPoolListener.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/pool/ConnPoolListener.java @@ -32,6 +32,7 @@ /** * Connection pool event listener. * + * @param the route type that represents the opposite endpoint of a pooled connection. * @since 5.0 */ @Contract(threading = ThreadingBehavior.STATELESS) diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/ReflectionUtils.java b/httpcore5/src/main/java/org/apache/hc/core5/util/ReflectionUtils.java index c56deb6a74..749268dbae 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/util/ReflectionUtils.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/util/ReflectionUtils.java @@ -49,7 +49,8 @@ public static T callGetter(final Object object, final String getterName, fin } /** - * @sunce 5.3 + * @param The return type. + * @since 5.3 */ public static T callGetter(final Object object, final String getterName, final Object arg, final Class argType, final Class resultType) { try { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java index a947dba750..dd0e994286 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java @@ -91,6 +91,7 @@ public static int asBoundInt(final long value) { * Returns the given {@code timeValue} if it is not {@code null}, if {@code null} then returns the given * {@code defaultValue}. * + * @param The type of {@link TimeValue}. * @param timeValue may be {@code null} * @param defaultValue may be {@code null} * @return {@code timeValue} or {@code defaultValue}