Home / Function/ encode() — netty Function Reference

encode() — netty Function Reference

Architecture documentation for the encode() function in HAProxyMessageEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a87bc120_6d1a_d0f4_f2a7_ccb9bedf10e5["encode()"]
  b42a18dd_ae6a_f2e4_51f0_5f6605567255["HAProxyMessageEncoder"]
  a87bc120_6d1a_d0f4_f2a7_ccb9bedf10e5 -->|defined in| b42a18dd_ae6a_f2e4_51f0_5f6605567255
  342e378f_7a0c_5abc_da2e_26918c348787["encodeV1()"]
  a87bc120_6d1a_d0f4_f2a7_ccb9bedf10e5 -->|calls| 342e378f_7a0c_5abc_da2e_26918c348787
  deef989c_de3d_8f0c_8771_ef49cf56d11a["encodeV2()"]
  a87bc120_6d1a_d0f4_f2a7_ccb9bedf10e5 -->|calls| deef989c_de3d_8f0c_8771_ef49cf56d11a
  style a87bc120_6d1a_d0f4_f2a7_ccb9bedf10e5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageEncoder.java lines 49–61

    @Override
    protected void encode(ChannelHandlerContext ctx, HAProxyMessage msg, ByteBuf out) throws Exception {
        switch (msg.protocolVersion()) {
            case V1:
                encodeV1(msg, out);
                break;
            case V2:
                encodeV2(msg, out);
                break;
            default:
                throw new HAProxyProtocolException("Unsupported version: " + msg.protocolVersion());
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does encode() do?
encode() is a function in the netty codebase, defined in codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageEncoder.java.
Where is encode() defined?
encode() is defined in codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageEncoder.java at line 49.
What does encode() call?
encode() calls 2 function(s): encodeV1, encodeV2.

Analyze Your Own Codebase

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

Try Supermodel Free