Skip to content

Commit

Permalink
Javadoc improvements
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
garydgregory committed Aug 17, 2024
1 parent d147ce9 commit e8f2a67
Show file tree
Hide file tree
Showing 27 changed files with 332 additions and 164 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,18 @@ public static H2MultiplexingRequesterBootstrap bootstrap() {

/**
* Sets I/O reactor configuration.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) {
this.ioReactorConfig = ioReactorConfig;
return this;
}

/**
* Assigns {@link HttpProcessor} instance.
* Sets {@link HttpProcessor} instance.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) {
this.httpProcessor = httpProcessor;
Expand All @@ -97,6 +101,8 @@ public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcess

/**
* Sets HTTP/2 protocol parameters
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Config) {
this.h2Config = h2Config;
Expand All @@ -105,14 +111,18 @@ public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Confi

/**
* Sets message char coding.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
this.charCodingConfig = charCodingConfig;
return this;
}

/**
* Assigns {@link TlsStrategy} instance.
* Sets {@link TlsStrategy} instance.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) {
this.tlsStrategy = tlsStrategy;
Expand All @@ -125,39 +135,49 @@ public final H2MultiplexingRequesterBootstrap setStrictALPNHandshake(final boole
}

/**
* Assigns {@link IOSession} {@link Decorator} instance.
* Sets {@link IOSession} {@link Decorator} instance.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setIOSessionDecorator(final Decorator<IOSession> ioSessionDecorator) {
this.ioSessionDecorator = ioSessionDecorator;
return this;
}

/**
* Assigns {@link Exception} {@link Callback} instance.
* Sets {@link Exception} {@link Callback} instance.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback) {
this.exceptionCallback = exceptionCallback;
return this;
}

/**
* Assigns {@link IOSessionListener} instance.
* Sets {@link IOSessionListener} instance.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) {
this.sessionListener = sessionListener;
return this;
}

/**
* Assigns {@link H2StreamListener} instance.
* Sets {@link H2StreamListener} instance.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setStreamListener(final H2StreamListener streamListener) {
this.streamListener = streamListener;
return this;
}

/**
* Assigns {@link UriPatternType} for handler registration.
* Sets {@link UriPatternType} for handler registration.
*
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) {
this.uriPatternType = uriPatternType;
Expand All @@ -170,6 +190,7 @@ public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPattern
*
* @param uriPattern the pattern to register the handler for.
* @param supplier the handler supplier.
* @return this instance.
*/
public final H2MultiplexingRequesterBootstrap register(final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
Args.notBlank(uriPattern, "URI pattern");
Expand All @@ -185,6 +206,7 @@ public final H2MultiplexingRequesterBootstrap register(final String uriPattern,
* @param hostname the host name
* @param uriPattern the pattern to register the handler for.
* @param supplier the handler supplier.
* @return this instance.
*
* @since 5.3
*/
Expand All @@ -197,6 +219,7 @@ public final H2MultiplexingRequesterBootstrap register(final String hostname, fi
}

/**
* @return this instance.
* @deprecated Use {@link #register(String, String, Supplier)}.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,18 @@ public static H2RequesterBootstrap bootstrap() {

/**
* Sets I/O reactor configuration.
*
* @return this instance.
*/
public final H2RequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) {
this.ioReactorConfig = ioReactorConfig;
return this;
}

/**
* Assigns {@link HttpProcessor} instance.
* Sets {@link HttpProcessor} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) {
this.httpProcessor = httpProcessor;
Expand All @@ -126,6 +130,8 @@ public final H2RequesterBootstrap setHttpProcessor(final HttpProcessor httpProce

/**
* Sets HTTP protocol version policy
*
* @return this instance.
*/
public final H2RequesterBootstrap setVersionPolicy(final HttpVersionPolicy versionPolicy) {
this.versionPolicy = versionPolicy;
Expand All @@ -134,6 +140,8 @@ public final H2RequesterBootstrap setVersionPolicy(final HttpVersionPolicy versi

/**
* Sets HTTP/2 protocol parameters
*
* @return this instance.
*/
public final H2RequesterBootstrap setH2Config(final H2Config h2Config) {
this.h2Config = h2Config;
Expand All @@ -142,6 +150,8 @@ public final H2RequesterBootstrap setH2Config(final H2Config h2Config) {

/**
* Sets HTTP/1.1 protocol parameters
*
* @return this instance.
*/
public final H2RequesterBootstrap setHttp1Config(final Http1Config http1Config) {
this.http1Config = http1Config;
Expand All @@ -150,6 +160,8 @@ public final H2RequesterBootstrap setHttp1Config(final Http1Config http1Config)

/**
* Sets message char coding.
*
* @return this instance.
*/
public final H2RequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
this.charCodingConfig = charCodingConfig;
Expand All @@ -172,15 +184,19 @@ public final H2RequesterBootstrap setTimeToLive(final TimeValue timeToLive) {
}

/**
* Assigns {@link PoolReusePolicy} instance.
* Sets {@link PoolReusePolicy} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setPoolReusePolicy(final PoolReusePolicy poolReusePolicy) {
this.poolReusePolicy = poolReusePolicy;
return this;
}

/**
* Assigns {@link PoolConcurrencyPolicy} instance.
* Sets {@link PoolConcurrencyPolicy} instance.
*
* @return this instance.
*/
@Experimental
public final H2RequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrencyPolicy poolConcurrencyPolicy) {
Expand All @@ -189,7 +205,9 @@ public final H2RequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrency
}

/**
* Assigns {@link TlsStrategy} instance.
* Sets {@link TlsStrategy} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) {
this.tlsStrategy = tlsStrategy;
Expand All @@ -202,55 +220,69 @@ public final H2RequesterBootstrap setHandshakeTimeout(final Timeout handshakeTim
}

/**
* Assigns {@link IOSession} {@link Decorator} instance.
* Sets {@link IOSession} {@link Decorator} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setIOSessionDecorator(final Decorator<IOSession> ioSessionDecorator) {
this.ioSessionDecorator = ioSessionDecorator;
return this;
}

/**
* Assigns {@link Exception} {@link Callback} instance.
* Sets {@link Exception} {@link Callback} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback) {
this.exceptionCallback = exceptionCallback;
return this;
}

/**
* Assigns {@link IOSessionListener} instance.
* Sets {@link IOSessionListener} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) {
this.sessionListener = sessionListener;
return this;
}

/**
* Assigns {@link H2StreamListener} instance.
* Sets {@link H2StreamListener} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setStreamListener(final H2StreamListener streamListener) {
this.streamListener = streamListener;
return this;
}

/**
* Assigns {@link Http1StreamListener} instance.
* Sets {@link Http1StreamListener} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setStreamListener(final Http1StreamListener http1StreamListener) {
this.http1StreamListener = http1StreamListener;
return this;
}

/**
* Assigns {@link ConnPoolListener} instance.
* Sets {@link ConnPoolListener} instance.
*
* @return this instance.
*/
public final H2RequesterBootstrap setConnPoolListener(final ConnPoolListener<HttpHost> connPoolListener) {
this.connPoolListener = connPoolListener;
return this;
}

/**
* Assigns {@link UriPatternType} for handler registration.
* Sets {@link UriPatternType} for handler registration.
*
* @return this instance.
*/
public final H2RequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) {
this.uriPatternType = uriPatternType;
Expand All @@ -263,6 +295,7 @@ public final H2RequesterBootstrap setUriPatternType(final UriPatternType uriPatt
*
* @param uriPattern the pattern to register the handler for.
* @param supplier the handler supplier.
* @return this instance.
*/
public final H2RequesterBootstrap register(final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
Args.notBlank(uriPattern, "URI pattern");
Expand All @@ -278,6 +311,7 @@ public final H2RequesterBootstrap register(final String uriPattern, final Suppli
* @param hostname the host name
* @param uriPattern the pattern to register the handler for.
* @param supplier the handler supplier.
* @return this instance.
*
* @since 5.3
*/
Expand Down
Loading

0 comments on commit e8f2a67

Please sign in to comment.