Skip to content

Commit e8f2a67

Browse files
committed
Javadoc improvements
- No need to use a FQCN when the name is already importted - Import type instead of using a FQCN - Use camel-case in paramerter name - Add missing Javadoc - Add some missing return tags - Close some HTML tags - Fix some comments
1 parent d147ce9 commit e8f2a67

27 files changed

+332
-164
lines changed

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,18 @@ public static H2MultiplexingRequesterBootstrap bootstrap() {
8181

8282
/**
8383
* Sets I/O reactor configuration.
84+
*
85+
* @return this instance.
8486
*/
8587
public final H2MultiplexingRequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) {
8688
this.ioReactorConfig = ioReactorConfig;
8789
return this;
8890
}
8991

9092
/**
91-
* Assigns {@link HttpProcessor} instance.
93+
* Sets {@link HttpProcessor} instance.
94+
*
95+
* @return this instance.
9296
*/
9397
public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) {
9498
this.httpProcessor = httpProcessor;
@@ -97,6 +101,8 @@ public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcess
97101

98102
/**
99103
* Sets HTTP/2 protocol parameters
104+
*
105+
* @return this instance.
100106
*/
101107
public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Config) {
102108
this.h2Config = h2Config;
@@ -105,14 +111,18 @@ public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Confi
105111

106112
/**
107113
* Sets message char coding.
114+
*
115+
* @return this instance.
108116
*/
109117
public final H2MultiplexingRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
110118
this.charCodingConfig = charCodingConfig;
111119
return this;
112120
}
113121

114122
/**
115-
* Assigns {@link TlsStrategy} instance.
123+
* Sets {@link TlsStrategy} instance.
124+
*
125+
* @return this instance.
116126
*/
117127
public final H2MultiplexingRequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) {
118128
this.tlsStrategy = tlsStrategy;
@@ -125,39 +135,49 @@ public final H2MultiplexingRequesterBootstrap setStrictALPNHandshake(final boole
125135
}
126136

127137
/**
128-
* Assigns {@link IOSession} {@link Decorator} instance.
138+
* Sets {@link IOSession} {@link Decorator} instance.
139+
*
140+
* @return this instance.
129141
*/
130142
public final H2MultiplexingRequesterBootstrap setIOSessionDecorator(final Decorator<IOSession> ioSessionDecorator) {
131143
this.ioSessionDecorator = ioSessionDecorator;
132144
return this;
133145
}
134146

135147
/**
136-
* Assigns {@link Exception} {@link Callback} instance.
148+
* Sets {@link Exception} {@link Callback} instance.
149+
*
150+
* @return this instance.
137151
*/
138152
public final H2MultiplexingRequesterBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback) {
139153
this.exceptionCallback = exceptionCallback;
140154
return this;
141155
}
142156

143157
/**
144-
* Assigns {@link IOSessionListener} instance.
158+
* Sets {@link IOSessionListener} instance.
159+
*
160+
* @return this instance.
145161
*/
146162
public final H2MultiplexingRequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) {
147163
this.sessionListener = sessionListener;
148164
return this;
149165
}
150166

151167
/**
152-
* Assigns {@link H2StreamListener} instance.
168+
* Sets {@link H2StreamListener} instance.
169+
*
170+
* @return this instance.
153171
*/
154172
public final H2MultiplexingRequesterBootstrap setStreamListener(final H2StreamListener streamListener) {
155173
this.streamListener = streamListener;
156174
return this;
157175
}
158176

159177
/**
160-
* Assigns {@link UriPatternType} for handler registration.
178+
* Sets {@link UriPatternType} for handler registration.
179+
*
180+
* @return this instance.
161181
*/
162182
public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) {
163183
this.uriPatternType = uriPatternType;
@@ -170,6 +190,7 @@ public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPattern
170190
*
171191
* @param uriPattern the pattern to register the handler for.
172192
* @param supplier the handler supplier.
193+
* @return this instance.
173194
*/
174195
public final H2MultiplexingRequesterBootstrap register(final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
175196
Args.notBlank(uriPattern, "URI pattern");
@@ -185,6 +206,7 @@ public final H2MultiplexingRequesterBootstrap register(final String uriPattern,
185206
* @param hostname the host name
186207
* @param uriPattern the pattern to register the handler for.
187208
* @param supplier the handler supplier.
209+
* @return this instance.
188210
*
189211
* @since 5.3
190212
*/
@@ -197,6 +219,7 @@ public final H2MultiplexingRequesterBootstrap register(final String hostname, fi
197219
}
198220

199221
/**
222+
* @return this instance.
200223
* @deprecated Use {@link #register(String, String, Supplier)}.
201224
*/
202225
@Deprecated

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,18 @@ public static H2RequesterBootstrap bootstrap() {
110110

111111
/**
112112
* Sets I/O reactor configuration.
113+
*
114+
* @return this instance.
113115
*/
114116
public final H2RequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) {
115117
this.ioReactorConfig = ioReactorConfig;
116118
return this;
117119
}
118120

119121
/**
120-
* Assigns {@link HttpProcessor} instance.
122+
* Sets {@link HttpProcessor} instance.
123+
*
124+
* @return this instance.
121125
*/
122126
public final H2RequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) {
123127
this.httpProcessor = httpProcessor;
@@ -126,6 +130,8 @@ public final H2RequesterBootstrap setHttpProcessor(final HttpProcessor httpProce
126130

127131
/**
128132
* Sets HTTP protocol version policy
133+
*
134+
* @return this instance.
129135
*/
130136
public final H2RequesterBootstrap setVersionPolicy(final HttpVersionPolicy versionPolicy) {
131137
this.versionPolicy = versionPolicy;
@@ -134,6 +140,8 @@ public final H2RequesterBootstrap setVersionPolicy(final HttpVersionPolicy versi
134140

135141
/**
136142
* Sets HTTP/2 protocol parameters
143+
*
144+
* @return this instance.
137145
*/
138146
public final H2RequesterBootstrap setH2Config(final H2Config h2Config) {
139147
this.h2Config = h2Config;
@@ -142,6 +150,8 @@ public final H2RequesterBootstrap setH2Config(final H2Config h2Config) {
142150

143151
/**
144152
* Sets HTTP/1.1 protocol parameters
153+
*
154+
* @return this instance.
145155
*/
146156
public final H2RequesterBootstrap setHttp1Config(final Http1Config http1Config) {
147157
this.http1Config = http1Config;
@@ -150,6 +160,8 @@ public final H2RequesterBootstrap setHttp1Config(final Http1Config http1Config)
150160

151161
/**
152162
* Sets message char coding.
163+
*
164+
* @return this instance.
153165
*/
154166
public final H2RequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
155167
this.charCodingConfig = charCodingConfig;
@@ -172,15 +184,19 @@ public final H2RequesterBootstrap setTimeToLive(final TimeValue timeToLive) {
172184
}
173185

174186
/**
175-
* Assigns {@link PoolReusePolicy} instance.
187+
* Sets {@link PoolReusePolicy} instance.
188+
*
189+
* @return this instance.
176190
*/
177191
public final H2RequesterBootstrap setPoolReusePolicy(final PoolReusePolicy poolReusePolicy) {
178192
this.poolReusePolicy = poolReusePolicy;
179193
return this;
180194
}
181195

182196
/**
183-
* Assigns {@link PoolConcurrencyPolicy} instance.
197+
* Sets {@link PoolConcurrencyPolicy} instance.
198+
*
199+
* @return this instance.
184200
*/
185201
@Experimental
186202
public final H2RequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrencyPolicy poolConcurrencyPolicy) {
@@ -189,7 +205,9 @@ public final H2RequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrency
189205
}
190206

191207
/**
192-
* Assigns {@link TlsStrategy} instance.
208+
* Sets {@link TlsStrategy} instance.
209+
*
210+
* @return this instance.
193211
*/
194212
public final H2RequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) {
195213
this.tlsStrategy = tlsStrategy;
@@ -202,55 +220,69 @@ public final H2RequesterBootstrap setHandshakeTimeout(final Timeout handshakeTim
202220
}
203221

204222
/**
205-
* Assigns {@link IOSession} {@link Decorator} instance.
223+
* Sets {@link IOSession} {@link Decorator} instance.
224+
*
225+
* @return this instance.
206226
*/
207227
public final H2RequesterBootstrap setIOSessionDecorator(final Decorator<IOSession> ioSessionDecorator) {
208228
this.ioSessionDecorator = ioSessionDecorator;
209229
return this;
210230
}
211231

212232
/**
213-
* Assigns {@link Exception} {@link Callback} instance.
233+
* Sets {@link Exception} {@link Callback} instance.
234+
*
235+
* @return this instance.
214236
*/
215237
public final H2RequesterBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback) {
216238
this.exceptionCallback = exceptionCallback;
217239
return this;
218240
}
219241

220242
/**
221-
* Assigns {@link IOSessionListener} instance.
243+
* Sets {@link IOSessionListener} instance.
244+
*
245+
* @return this instance.
222246
*/
223247
public final H2RequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) {
224248
this.sessionListener = sessionListener;
225249
return this;
226250
}
227251

228252
/**
229-
* Assigns {@link H2StreamListener} instance.
253+
* Sets {@link H2StreamListener} instance.
254+
*
255+
* @return this instance.
230256
*/
231257
public final H2RequesterBootstrap setStreamListener(final H2StreamListener streamListener) {
232258
this.streamListener = streamListener;
233259
return this;
234260
}
235261

236262
/**
237-
* Assigns {@link Http1StreamListener} instance.
263+
* Sets {@link Http1StreamListener} instance.
264+
*
265+
* @return this instance.
238266
*/
239267
public final H2RequesterBootstrap setStreamListener(final Http1StreamListener http1StreamListener) {
240268
this.http1StreamListener = http1StreamListener;
241269
return this;
242270
}
243271

244272
/**
245-
* Assigns {@link ConnPoolListener} instance.
273+
* Sets {@link ConnPoolListener} instance.
274+
*
275+
* @return this instance.
246276
*/
247277
public final H2RequesterBootstrap setConnPoolListener(final ConnPoolListener<HttpHost> connPoolListener) {
248278
this.connPoolListener = connPoolListener;
249279
return this;
250280
}
251281

252282
/**
253-
* Assigns {@link UriPatternType} for handler registration.
283+
* Sets {@link UriPatternType} for handler registration.
284+
*
285+
* @return this instance.
254286
*/
255287
public final H2RequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) {
256288
this.uriPatternType = uriPatternType;
@@ -263,6 +295,7 @@ public final H2RequesterBootstrap setUriPatternType(final UriPatternType uriPatt
263295
*
264296
* @param uriPattern the pattern to register the handler for.
265297
* @param supplier the handler supplier.
298+
* @return this instance.
266299
*/
267300
public final H2RequesterBootstrap register(final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
268301
Args.notBlank(uriPattern, "URI pattern");
@@ -278,6 +311,7 @@ public final H2RequesterBootstrap register(final String uriPattern, final Suppli
278311
* @param hostname the host name
279312
* @param uriPattern the pattern to register the handler for.
280313
* @param supplier the handler supplier.
314+
* @return this instance.
281315
*
282316
* @since 5.3
283317
*/

0 commit comments

Comments
 (0)