Home / Function/ ChannelFuture() — netty Function Reference

ChannelFuture() — netty Function Reference

Architecture documentation for the ChannelFuture() function in DefaultHttp2ConnectionEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31["ChannelFuture()"]
  895939a0_f585_4538_b1ac_90be365f6464["DefaultHttp2ConnectionEncoder"]
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 -->|defined in| 895939a0_f585_4538_b1ac_90be365f6464
  192a7df9_e57e_16a9_360a_44ba8f82d3d9["FlowControlledData()"]
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 -->|calls| 192a7df9_e57e_16a9_360a_44ba8f82d3d9
  fc927e32_0015_8367_c80d_152971d2d016["validateHeadersSentState()"]
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 -->|calls| fc927e32_0015_8367_c80d_152971d2d016
  16870f01_7936_6d5a_1995_e011144a1ad6["notifyLifecycleManagerOnError()"]
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 -->|calls| 16870f01_7936_6d5a_1995_e011144a1ad6
  3cbf6447_3cb5_f2c9_125c_6b623cb2aab0["FlowControlledHeaders()"]
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 -->|calls| 3cbf6447_3cb5_f2c9_125c_6b623cb2aab0
  3b9fd337_1dee_1fd1_8836_e44e24fe69ae["remoteSettings()"]
  f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 -->|calls| 3b9fd337_1dee_1fd1_8836_e44e24fe69ae
  style f7c83e25_f1bc_4ff3_1eaa_ebd5521fad31 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java lines 118–144

    @Override
    public ChannelFuture writeData(final ChannelHandlerContext ctx, final int streamId, ByteBuf data, int padding,
            final boolean endOfStream, ChannelPromise promise) {
        promise = promise.unvoid();
        final Http2Stream stream;
        try {
            stream = requireStream(streamId);

            // Verify that the stream is in the appropriate state for sending DATA frames.
            switch (stream.state()) {
                case OPEN:
                case HALF_CLOSED_REMOTE:
                    // Allowed sending DATA frames in these states.
                    break;
                default:
                    throw new IllegalStateException("Stream " + stream.id() + " in unexpected state " + stream.state());
            }
        } catch (Throwable e) {
            data.release();
            return promise.setFailure(e);
        }

        // Hand control of the frame to the flow controller.
        flowController().addFlowControlled(stream,
                new FlowControlledData(stream, data, padding, endOfStream, promise));
        return promise;
    }

Domain

Subdomains

Frequently Asked Questions

What does ChannelFuture() do?
ChannelFuture() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java.
Where is ChannelFuture() defined?
ChannelFuture() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java at line 118.
What does ChannelFuture() call?
ChannelFuture() calls 5 function(s): FlowControlledData, FlowControlledHeaders, notifyLifecycleManagerOnError, remoteSettings, validateHeadersSentState.

Analyze Your Own Codebase

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

Try Supermodel Free