Home / Function/ write() — netty Function Reference

write() — netty Function Reference

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

Function java Buffer Allocators calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  d9006e3b_57b1_d5dd_3732_26d895ab9344["write()"]
  744ef0a5_0445_f8d5_b780_329fc3f741f7["FlowControlledHeaders"]
  d9006e3b_57b1_d5dd_3732_26d895ab9344 -->|defined in| 744ef0a5_0445_f8d5_b780_329fc3f741f7
  00bd83d0_dcec_5387_7a17_1c0f317ff485["write()"]
  00bd83d0_dcec_5387_7a17_1c0f317ff485 -->|calls| d9006e3b_57b1_d5dd_3732_26d895ab9344
  00bd83d0_dcec_5387_7a17_1c0f317ff485["write()"]
  d9006e3b_57b1_d5dd_3732_26d895ab9344 -->|calls| 00bd83d0_dcec_5387_7a17_1c0f317ff485
  fc927e32_0015_8367_c80d_152971d2d016["validateHeadersSentState()"]
  d9006e3b_57b1_d5dd_3732_26d895ab9344 -->|calls| fc927e32_0015_8367_c80d_152971d2d016
  style d9006e3b_57b1_d5dd_3732_26d895ab9344 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java lines 572–588

        @Override
        public void write(ChannelHandlerContext ctx, int allowedBytes) {
            boolean isInformational = validateHeadersSentState(stream, headers, connection.isServer(), endOfStream);
            // The code is currently requiring adding this listener before writing, in order to call onError() before
            // closeStreamLocal().
            promise.addListener(this);

            ChannelFuture f = sendHeaders(frameWriter, ctx, stream.id(), headers, hasPriority, streamDependency,
                    weight, exclusive, padding, endOfStream, promise);
            // Writing headers may fail during the encode state if they violate HPACK limits.
            Throwable failureCause = f.cause();
            if (failureCause == null) {
                // This just sets internal stream state which is used elsewhere in the codec and doesn't
                // necessarily mean the write will complete successfully.
                stream.headersSent(isInformational);
            }
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does write() do?
write() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java.
Where is write() defined?
write() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java at line 572.
What does write() call?
write() calls 2 function(s): validateHeadersSentState, write.
What calls write()?
write() is called by 1 function(s): write.

Analyze Your Own Codebase

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

Try Supermodel Free