Home / Class/ HandleImpl Class — netty Architecture

HandleImpl Class — netty Architecture

Architecture documentation for the HandleImpl class in DefaultMessageSizeEstimator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  dbfdcb5b_d495_91bf_c683_cf2f179e76e9["HandleImpl"]
  be94460f_3964_b886_5959_e9a672808cdd["DefaultMessageSizeEstimator.java"]
  dbfdcb5b_d495_91bf_c683_cf2f179e76e9 -->|defined in| be94460f_3964_b886_5959_e9a672808cdd
  21a0c425_3336_4def_e1a4_4bb15bb7b7f0["HandleImpl()"]
  dbfdcb5b_d495_91bf_c683_cf2f179e76e9 -->|method| 21a0c425_3336_4def_e1a4_4bb15bb7b7f0
  840cc53a_856b_52f0_c731_100c504032db["size()"]
  dbfdcb5b_d495_91bf_c683_cf2f179e76e9 -->|method| 840cc53a_856b_52f0_c731_100c504032db

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/DefaultMessageSizeEstimator.java lines 29–49

    private static final class HandleImpl implements Handle {
        private final int unknownSize;

        private HandleImpl(int unknownSize) {
            this.unknownSize = unknownSize;
        }

        @Override
        public int size(Object msg) {
            if (msg instanceof ByteBuf) {
                return ((ByteBuf) msg).readableBytes();
            }
            if (msg instanceof ByteBufHolder) {
                return ((ByteBufHolder) msg).content().readableBytes();
            }
            if (msg instanceof FileRegion) {
                return 0;
            }
            return unknownSize;
        }
    }

Frequently Asked Questions

What is the HandleImpl class?
HandleImpl is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/DefaultMessageSizeEstimator.java.
Where is HandleImpl defined?
HandleImpl is defined in transport/src/main/java/io/netty/channel/DefaultMessageSizeEstimator.java at line 29.

Analyze Your Own Codebase

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

Try Supermodel Free