Skip to content

Commit b87a1a7

Browse files
committed
Add javadoc
1 parent 4a16d5c commit b87a1a7

4 files changed

Lines changed: 27 additions & 10 deletions

File tree

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/H2OverH2TunnelExchangeHandler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@
6060
import org.apache.hc.core5.util.Timeout;
6161

6262
/**
63-
* Exchange handler that establishes CONNECT and then exposes the tunnel stream as a ProtocolIOSession.
63+
* Exchange handler that establishes an HTTP/2 CONNECT tunnel and exposes
64+
* the resulting data stream as a {@link ProtocolIOSession}.
65+
*
66+
* @since 5.5
6467
*/
6568
final class H2OverH2TunnelExchangeHandler implements AsyncClientExchangeHandler {
6669

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/H2OverH2TunnelSupport.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
package org.apache.hc.core5.http2.nio.support;
2828

29+
import org.apache.hc.core5.annotation.Contract;
30+
import org.apache.hc.core5.annotation.ThreadingBehavior;
2931
import org.apache.hc.core5.concurrent.FutureCallback;
3032
import org.apache.hc.core5.http.HttpRequestInterceptor;
3133
import org.apache.hc.core5.http.nio.command.RequestExecutionCommand;
@@ -41,20 +43,20 @@
4143
import org.apache.hc.core5.util.Timeout;
4244

4345
/**
44-
* Helper for establishing HTTP/2 tunnels through HTTP/2 proxies using the CONNECT method.
45-
*
46+
* Helper for establishing HTTP/2 CONNECT tunnels through HTTP/2 proxies.
4647
* <p>
47-
* Multiplexing-safe: tunnel close/reset affects only the CONNECT stream (via StreamControl),
48-
* never the underlying physical HTTP/2 connection.
48+
* Multiplexing-safe: tunnel close affects only the CONNECT stream,
49+
* not the underlying physical HTTP/2 connection.
4950
* </p>
50-
*
5151
* <p>
52-
* Note: This helper does not implement proxy authentication challenge handling (407 retries).
53-
* That belongs in client implementations that maintain authentication state.
52+
* This helper does not handle proxy authentication (407 retries).
53+
* That responsibility belongs to client implementations that maintain
54+
* authentication state.
5455
* </p>
5556
*
5657
* @since 5.5
5758
*/
59+
@Contract(threading = ThreadingBehavior.STATELESS)
5860
public final class H2OverH2TunnelSupport {
5961

6062
private H2OverH2TunnelSupport() {

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/H2TunnelProtocolIOSession.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@
5757
import org.apache.hc.core5.util.Timeout;
5858

5959
/**
60-
* ProtocolIOSession backed by a single HTTP/2 CONNECT stream.
60+
* {@link ProtocolIOSession} backed by a single HTTP/2 CONNECT stream.
61+
* <p>
62+
* Supports optional TLS upgrade via {@link #startTls} for establishing
63+
* secure tunnels to the target endpoint.
64+
* </p>
65+
*
66+
* @since 5.5
6167
*/
6268
final class H2TunnelProtocolIOSession implements ProtocolIOSession {
6369

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/H2TunnelRawIOSession.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,14 @@
4747
import org.apache.hc.core5.util.Timeout;
4848

4949
/**
50-
* Raw tunnel IOSession implementation: bounded buffering + capacity updates + stream-scoped close/cancel.
50+
* Raw tunnel {@link IOSession} implementation with bounded buffering,
51+
* capacity flow control and stream-scoped close semantics.
5152
* <p>
53+
* Closing this session cancels only the CONNECT stream,
54+
* not the underlying physical HTTP/2 connection.
55+
* </p>
56+
*
57+
* @since 5.5
5258
*/
5359
final class H2TunnelRawIOSession implements IOSession {
5460

0 commit comments

Comments
 (0)