channelRead() — netty Function Reference
Architecture documentation for the channelRead() function in DefaultHttp2PushPromiseFrameTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d36dda17_5603_2e74_6899_d09d92687d79["channelRead()"] 4f26c93c_0586_84ae_b8d6_c3389b56672c["ClientHandler"] d36dda17_5603_2e74_6899_d09d92687d79 -->|defined in| 4f26c93c_0586_84ae_b8d6_c3389b56672c facc03cb_72c6_5e6c_d53a_96dfd538894c["channelRead()"] facc03cb_72c6_5e6c_d53a_96dfd538894c -->|calls| d36dda17_5603_2e74_6899_d09d92687d79 facc03cb_72c6_5e6c_d53a_96dfd538894c["channelRead()"] d36dda17_5603_2e74_6899_d09d92687d79 -->|calls| facc03cb_72c6_5e6c_d53a_96dfd538894c style d36dda17_5603_2e74_6899_d09d92687d79 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2PushPromiseFrameTest.java lines 189–231
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
if (msg instanceof Http2PushPromiseFrame) {
Http2PushPromiseFrame pushPromiseFrame = (Http2PushPromiseFrame) msg;
assertEquals("/meow", pushPromiseFrame.http2Headers().path().toString());
assertEquals("GET", pushPromiseFrame.http2Headers().method().toString());
assertEquals("https", pushPromiseFrame.http2Headers().scheme().toString());
assertEquals("localhost:5555", pushPromiseFrame.http2Headers().authority().toString());
Http2PriorityFrame priorityFrame = new DefaultHttp2PriorityFrame(pushPromiseFrame.stream().id(),
Http2CodecUtil.DEFAULT_PRIORITY_WEIGHT, true);
priorityFrame.stream(pushPromiseFrame.pushStream());
ctx.writeAndFlush(priorityFrame);
} else if (msg instanceof Http2HeadersFrame) {
Http2HeadersFrame headersFrame = (Http2HeadersFrame) msg;
if (headersFrame.stream().id() == 3) {
assertEquals("200", headersFrame.headers().status().toString());
assertEquals("false", headersFrame.headers().get("push").toString());
} else if (headersFrame.stream().id() == 2) {
assertEquals("200", headersFrame.headers().status().toString());
assertEquals("true", headersFrame.headers().get("push").toString());
} else {
ctx.writeAndFlush(new DefaultHttp2GoAwayFrame(Http2Error.REFUSED_STREAM));
}
} else if (msg instanceof Http2DataFrame) {
Http2DataFrame dataFrame = (Http2DataFrame) msg;
try {
if (dataFrame.stream().id() == 3) {
assertEquals("Meow", dataFrame.content().toString(CharsetUtil.UTF_8));
} else if (dataFrame.stream().id() == 2) {
assertEquals("Meow, I am Pushed via HTTP/2", dataFrame.content().toString(CharsetUtil.UTF_8));
} else {
ctx.writeAndFlush(new DefaultHttp2GoAwayFrame(Http2Error.REFUSED_STREAM));
}
} finally {
ReferenceCountUtil.release(dataFrame);
}
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does channelRead() do?
channelRead() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2PushPromiseFrameTest.java.
Where is channelRead() defined?
channelRead() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2PushPromiseFrameTest.java at line 189.
What does channelRead() call?
channelRead() calls 1 function(s): channelRead.
What calls channelRead()?
channelRead() is called by 1 function(s): channelRead.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free