Home / Function/ open0() — netty Function Reference

open0() — netty Function Reference

Architecture documentation for the open0() function in Http2StreamChannelBootstrap.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  172c38c6_af21_125c_acfb_43ad1a8f85fc["open0()"]
  5a534d0f_a13f_a12d_bbed_309a0c8a2c40["Http2StreamChannelBootstrap"]
  172c38c6_af21_125c_acfb_43ad1a8f85fc -->|defined in| 5a534d0f_a13f_a12d_bbed_309a0c8a2c40
  547c7db1_3c83_2dd0_b5d8_838da93a7d18["open()"]
  547c7db1_3c83_2dd0_b5d8_838da93a7d18 -->|calls| 172c38c6_af21_125c_acfb_43ad1a8f85fc
  8d65137a_a1a3_5280_72d5_6353ad731305["init()"]
  172c38c6_af21_125c_acfb_43ad1a8f85fc -->|calls| 8d65137a_a1a3_5280_72d5_6353ad731305
  style 172c38c6_af21_125c_acfb_43ad1a8f85fc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrap.java lines 163–203

    @Deprecated
    public void open0(ChannelHandlerContext ctx, final Promise<Http2StreamChannel> promise) {
        assert ctx.executor().inEventLoop();
        if (!promise.setUncancellable()) {
            return;
        }
        final Http2StreamChannel streamChannel;
        try {
            if (ctx.handler() instanceof Http2MultiplexCodec) {
                streamChannel = ((Http2MultiplexCodec) ctx.handler()).newOutboundStream();
            } else {
                streamChannel = ((Http2MultiplexHandler) ctx.handler()).newOutboundStream();
            }
        } catch (Exception e) {
            promise.setFailure(e);
            return;
        }
        try {
            init(streamChannel);
        } catch (Exception e) {
            streamChannel.unsafe().closeForcibly();
            promise.setFailure(e);
            return;
        }
        ChannelFuture future = ctx.channel().eventLoop().register(streamChannel);
        future.addListener(f -> {
            if (f.isSuccess()) {
                promise.setSuccess(streamChannel);
            } else if (f.isCancelled()) {
                promise.cancel(false);
            } else {
                if (streamChannel.isRegistered()) {
                    streamChannel.close();
                } else {
                    streamChannel.unsafe().closeForcibly();
                }

                promise.setFailure(f.cause());
            }
        });
    }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does open0() do?
open0() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrap.java.
Where is open0() defined?
open0() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrap.java at line 163.
What does open0() call?
open0() calls 1 function(s): init.
What calls open0()?
open0() is called by 1 function(s): open.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free