Home / Class/ Http2EmptyDataFrameConnectionDecoder Class — netty Architecture

Http2EmptyDataFrameConnectionDecoder Class — netty Architecture

Architecture documentation for the Http2EmptyDataFrameConnectionDecoder class in Http2EmptyDataFrameConnectionDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c0565f38_f6a2_a8bc_f180_44cc26adb353["Http2EmptyDataFrameConnectionDecoder"]
  9ca12e3e_4c44_d80d_8502_7eca93a864c7["Http2EmptyDataFrameConnectionDecoder.java"]
  c0565f38_f6a2_a8bc_f180_44cc26adb353 -->|defined in| 9ca12e3e_4c44_d80d_8502_7eca93a864c7
  96777fec_63f6_f2d1_9e11_664058944abd["Http2EmptyDataFrameConnectionDecoder()"]
  c0565f38_f6a2_a8bc_f180_44cc26adb353 -->|method| 96777fec_63f6_f2d1_9e11_664058944abd
  545cb81d_2f13_cae2_3425_aeb17f802837["frameListener()"]
  c0565f38_f6a2_a8bc_f180_44cc26adb353 -->|method| 545cb81d_2f13_cae2_3425_aeb17f802837
  676e9c9f_191b_8851_78ba_fa970bd6c2d8["Http2FrameListener()"]
  c0565f38_f6a2_a8bc_f180_44cc26adb353 -->|method| 676e9c9f_191b_8851_78ba_fa970bd6c2d8

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2EmptyDataFrameConnectionDecoder.java lines 23–56

final class Http2EmptyDataFrameConnectionDecoder extends DecoratingHttp2ConnectionDecoder {

    private final int maxConsecutiveEmptyFrames;

    Http2EmptyDataFrameConnectionDecoder(Http2ConnectionDecoder delegate, int maxConsecutiveEmptyFrames) {
        super(delegate);
        this.maxConsecutiveEmptyFrames = ObjectUtil.checkPositive(
                maxConsecutiveEmptyFrames, "maxConsecutiveEmptyFrames");
    }

    @Override
    public void frameListener(Http2FrameListener listener) {
        if (listener != null) {
            super.frameListener(new Http2EmptyDataFrameListener(listener, maxConsecutiveEmptyFrames));
        } else {
            super.frameListener(null);
        }
    }

    @Override
    public Http2FrameListener frameListener() {
        Http2FrameListener frameListener = frameListener0();
        // Unwrap the original Http2FrameListener as we add this decoder under the hood.
        if (frameListener instanceof Http2EmptyDataFrameListener) {
            return ((Http2EmptyDataFrameListener) frameListener).listener;
        }
        return frameListener;
    }

    // Package-private for testing
    Http2FrameListener frameListener0() {
        return super.frameListener();
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free