File tree Expand file tree Collapse file tree
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060import 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 */
6568final class H2OverH2TunnelExchangeHandler implements AsyncClientExchangeHandler {
6669
Original file line number Diff line number Diff line change 2626 */
2727package org .apache .hc .core5 .http2 .nio .support ;
2828
29+ import org .apache .hc .core5 .annotation .Contract ;
30+ import org .apache .hc .core5 .annotation .ThreadingBehavior ;
2931import org .apache .hc .core5 .concurrent .FutureCallback ;
3032import org .apache .hc .core5 .http .HttpRequestInterceptor ;
3133import org .apache .hc .core5 .http .nio .command .RequestExecutionCommand ;
4143import 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 )
5860public final class H2OverH2TunnelSupport {
5961
6062 private H2OverH2TunnelSupport () {
Original file line number Diff line number Diff line change 5757import 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 */
6268final class H2TunnelProtocolIOSession implements ProtocolIOSession {
6369
Original file line number Diff line number Diff line change 4747import 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 */
5359final class H2TunnelRawIOSession implements IOSession {
5460
You can’t perform that action at this time.
0 commit comments