5959import org .apache .hc .core5 .http .nio .support .DefaultAsyncResponseExchangeHandlerFactory ;
6060import org .apache .hc .core5 .http .nio .support .TerminalAsyncServerFilter ;
6161import org .apache .hc .core5 .http .protocol .HttpProcessor ;
62+ import org .apache .hc .core5 .http .protocol .LookupRegistry ;
6263import org .apache .hc .core5 .http .protocol .UriPatternType ;
6364import org .apache .hc .core5 .net .InetAddressUtils ;
6465import org .apache .hc .core5 .net .URIAuthority ;
@@ -99,13 +100,19 @@ private AsyncServerBootstrap() {
99100 this .filters = new ArrayList <>();
100101 }
101102
103+ /**
104+ * Creates a new AsyncServerBootstrap instance.
105+ *
106+ * @return a new AsyncServerBootstrap instance.
107+ */
102108 public static AsyncServerBootstrap bootstrap () {
103109 return new AsyncServerBootstrap ();
104110 }
105111
106112 /**
107113 * Sets canonical name (fully qualified domain name) of the server.
108114 *
115+ * @param canonicalHostName canonical name (fully qualified domain name) of the server.
109116 * @return this instance.
110117 */
111118 public final AsyncServerBootstrap setCanonicalHostName (final String canonicalHostName ) {
@@ -116,6 +123,7 @@ public final AsyncServerBootstrap setCanonicalHostName(final String canonicalHos
116123 /**
117124 * Sets I/O reactor configuration.
118125 *
126+ * @param ioReactorConfig I/O reactor configuration.
119127 * @return this instance.
120128 */
121129 public final AsyncServerBootstrap setIOReactorConfig (final IOReactorConfig ioReactorConfig ) {
@@ -126,6 +134,7 @@ public final AsyncServerBootstrap setIOReactorConfig(final IOReactorConfig ioRea
126134 /**
127135 * Sets HTTP/1.1 protocol parameters.
128136 *
137+ * @param http1Config HTTP/1.1 protocol parameters.
129138 * @return this instance.
130139 */
131140 public final AsyncServerBootstrap setHttp1Config (final Http1Config http1Config ) {
@@ -134,8 +143,9 @@ public final AsyncServerBootstrap setHttp1Config(final Http1Config http1Config)
134143 }
135144
136145 /**
137- * Sets connection configuration.
146+ * Sets char coding configuration.
138147 *
148+ * @param charCodingConfig char coding configuration.
139149 * @return this instance.
140150 */
141151 public final AsyncServerBootstrap setCharCodingConfig (final CharCodingConfig charCodingConfig ) {
@@ -144,8 +154,9 @@ public final AsyncServerBootstrap setCharCodingConfig(final CharCodingConfig cha
144154 }
145155
146156 /**
147- * Sets {@link org.apache.hc.core5.http.protocol. HttpProcessor} instance.
157+ * Sets {@link HttpProcessor} instance.
148158 *
159+ * @param httpProcessor {@link HttpProcessor} instance.
149160 * @return this instance.
150161 */
151162 public final AsyncServerBootstrap setHttpProcessor (final HttpProcessor httpProcessor ) {
@@ -154,8 +165,9 @@ public final AsyncServerBootstrap setHttpProcessor(final HttpProcessor httpProce
154165 }
155166
156167 /**
157- * Sets {@link org.apache.hc.core5.http. ConnectionReuseStrategy} instance.
168+ * Sets {@link ConnectionReuseStrategy} instance.
158169 *
170+ * @param connStrategy {@link ConnectionReuseStrategy} instance.
159171 * @return this instance.
160172 */
161173 public final AsyncServerBootstrap setConnectionReuseStrategy (final ConnectionReuseStrategy connStrategy ) {
@@ -166,6 +178,7 @@ public final AsyncServerBootstrap setConnectionReuseStrategy(final ConnectionReu
166178 /**
167179 * Sets {@link TlsStrategy} instance.
168180 *
181+ * @param tlsStrategy {@link TlsStrategy} instance.
169182 * @return this instance.
170183 */
171184 public final AsyncServerBootstrap setTlsStrategy (final TlsStrategy tlsStrategy ) {
@@ -176,6 +189,7 @@ public final AsyncServerBootstrap setTlsStrategy(final TlsStrategy tlsStrategy)
176189 /**
177190 * Sets TLS handshake {@link Timeout}.
178191 *
192+ * @param handshakeTimeout TLS handshake {@link Timeout}.
179193 * @return this instance.
180194 */
181195 public final AsyncServerBootstrap setTlsHandshakeTimeout (final Timeout handshakeTimeout ) {
@@ -186,6 +200,7 @@ public final AsyncServerBootstrap setTlsHandshakeTimeout(final Timeout handshake
186200 /**
187201 * Sets {@link IOSession} {@link Decorator} instance.
188202 *
203+ * @param ioSessionDecorator {@link IOSession} {@link Decorator} instance.
189204 * @return this instance.
190205 */
191206 public final AsyncServerBootstrap setIOSessionDecorator (final Decorator <IOSession > ioSessionDecorator ) {
@@ -196,6 +211,7 @@ public final AsyncServerBootstrap setIOSessionDecorator(final Decorator<IOSessio
196211 /**
197212 * Sets {@link Exception} {@link Callback} instance.
198213 *
214+ * @param exceptionCallback {@link Exception} {@link Callback} instance.
199215 * @return this instance.
200216 */
201217 public final AsyncServerBootstrap setExceptionCallback (final Callback <Exception > exceptionCallback ) {
@@ -206,6 +222,7 @@ public final AsyncServerBootstrap setExceptionCallback(final Callback<Exception>
206222 /**
207223 * Sets {@link IOSessionListener} instance.
208224 *
225+ * @param sessionListener {@link IOSessionListener} instance.
209226 * @return this instance.
210227 */
211228 public final AsyncServerBootstrap setIOSessionListener (final IOSessionListener sessionListener ) {
@@ -214,18 +231,22 @@ public final AsyncServerBootstrap setIOSessionListener(final IOSessionListener s
214231 }
215232
216233 /**
234+ * Sets a LookupRegistry for Suppliers of AsyncServerExchangeHandler.
235+ *
236+ * @param lookupRegistry LookupRegistry for Suppliers of AsyncServerExchangeHandler.
217237 * @return this instance.
218238 * @deprecated Use {@link RequestRouter}.
219239 */
220240 @ Deprecated
221- public final AsyncServerBootstrap setLookupRegistry (final org . apache . hc . core5 . http . protocol . LookupRegistry <Supplier <AsyncServerExchangeHandler >> lookupRegistry ) {
241+ public final AsyncServerBootstrap setLookupRegistry (final LookupRegistry <Supplier <AsyncServerExchangeHandler >> lookupRegistry ) {
222242 this .lookupRegistry = lookupRegistry ;
223243 return this ;
224244 }
225245
226246 /**
227247 * Sets {@link HttpRequestMapper} instance.
228248 *
249+ * @param requestRouter {@link HttpRequestMapper} instance.
229250 * @return this instance.
230251 * @see org.apache.hc.core5.http.impl.routing.RequestRouter
231252 * @since 5.3
@@ -238,6 +259,7 @@ public final AsyncServerBootstrap setRequestRouter(final HttpRequestMapper<Suppl
238259 /**
239260 * Sets {@link Http1StreamListener} instance.
240261 *
262+ * @param streamListener {@link Http1StreamListener} instance.
241263 * @return this instance.
242264 * @since 5.0
243265 */
@@ -250,8 +272,8 @@ public final AsyncServerBootstrap setStreamListener(final Http1StreamListener st
250272 * Registers the given {@link AsyncServerExchangeHandler} {@link Supplier} as a default handler for URIs
251273 * matching the given pattern.
252274 *
253- * @param uriPattern the pattern to register the handler for.
254- * @param supplier the handler supplier.
275+ * @param uriPattern the non-null pattern to register the handler for.
276+ * @param supplier the non-null handler supplier.
255277 * @return this instance.
256278 */
257279 public final AsyncServerBootstrap register (final String uriPattern , final Supplier <AsyncServerExchangeHandler > supplier ) {
@@ -263,11 +285,11 @@ public final AsyncServerBootstrap register(final String uriPattern, final Suppli
263285
264286 /**
265287 * Registers the given {@link AsyncServerExchangeHandler} {@link Supplier} as a handler for URIs
266- * matching the given host and the pattern.
288+ * matching the given host and pattern.
267289 *
268- * @param hostname the host name
269- * @param uriPattern the pattern to register the handler for.
270- * @param supplier the handler supplier.
290+ * @param hostname the non-null host name.
291+ * @param uriPattern the non-null pattern to register the handler for.
292+ * @param supplier the non-null handler supplier.
271293 * @return this instance.
272294 * @since 5.3
273295 */
@@ -280,9 +302,14 @@ public final AsyncServerBootstrap register(final String hostname, final String u
280302 }
281303
282304 /**
283- * @deprecated use {@link #register(String, String, Supplier)}.
305+ * Registers the given {@link AsyncServerExchangeHandler} {@link Supplier} as a handler for URIs
306+ * matching the given host and pattern.
284307 *
308+ * @param hostname the host name.
309+ * @param uriPattern the pattern to register the handler for.
310+ * @param supplier the handler supplier.
285311 * @return this instance.
312+ * @deprecated use {@link #register(String, String, Supplier)}.
286313 */
287314 @ Deprecated
288315 public final AsyncServerBootstrap registerVirtual (final String hostname , final String uriPattern , final Supplier <AsyncServerExchangeHandler > supplier ) {
@@ -307,8 +334,9 @@ public final <T> AsyncServerBootstrap register(
307334
308335 /**
309336 * Registers the given {@link AsyncServerRequestHandler} as a handler for URIs
310- * matching the given host and the pattern.
337+ * matching the given host and pattern.
311338 *
339+ * @param <T> the request type.
312340 * @param hostname the host name
313341 * @param uriPattern the pattern to register the handler for.
314342 * @param requestHandler the handler.
@@ -321,6 +349,7 @@ public final <T> AsyncServerBootstrap register(final String hostname, final Stri
321349 }
322350
323351 /**
352+ * @param <T> the request type.
324353 * @return this instance.
325354 * @deprecated Use {@link #register(String, String, AsyncServerRequestHandler)}.
326355 */
0 commit comments