Home / Class/ BaseDecoder Class — netty Architecture

BaseDecoder Class — netty Architecture

Architecture documentation for the BaseDecoder class in Http2ConnectionHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed["BaseDecoder"]
  9c883019_01e3_e30b_1c79_24fbb727545e["Http2ConnectionHandler.java"]
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed -->|defined in| 9c883019_01e3_e30b_1c79_24fbb727545e
  89ff9594_27a4_7532_5875_c413d82c94c3["decode()"]
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed -->|method| 89ff9594_27a4_7532_5875_c413d82c94c3
  c01583a8_0c07_f7cb_3334_fb089df50bf1["handlerRemoved()"]
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed -->|method| c01583a8_0c07_f7cb_3334_fb089df50bf1
  a5d6cf52_febd_34f7_689c_cff0f2529e56["channelActive()"]
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed -->|method| a5d6cf52_febd_34f7_689c_cff0f2529e56
  13472518_8540_e0ef_4907_dd1c5bb8675f["channelInactive()"]
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed -->|method| 13472518_8540_e0ef_4907_dd1c5bb8675f
  9c007ae3_cb9e_a339_555b_829b3c816141["prefaceSent()"]
  05afe0cf_4e0b_dc2b_8cc7_bc0bf148d5ed -->|method| 9c007ae3_cb9e_a339_555b_829b3c816141

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java lines 203–224

    private abstract class BaseDecoder {
        public abstract void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception;
        public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { }
        public void channelActive(ChannelHandlerContext ctx) throws Exception { }

        public void channelInactive(ChannelHandlerContext ctx) throws Exception {
            // Connection has terminated, close the encoder and decoder.
            encoder().close();
            decoder().close();

            // We need to remove all streams (not just the active ones).
            // See https://github.com/netty/netty/issues/4838.
            connection().close(ctx.voidPromise());
        }

        /**
         * Determine if the HTTP/2 connection preface been sent.
         */
        public boolean prefaceSent() {
            return true;
        }
    }

Frequently Asked Questions

What is the BaseDecoder class?
BaseDecoder is a class in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java.
Where is BaseDecoder defined?
BaseDecoder is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java at line 203.

Analyze Your Own Codebase

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

Try Supermodel Free