channelRead() — netty Function Reference
Architecture documentation for the channelRead() function in WebSocketServerExtensionHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d87ca89c_b75d_4af9_10fe_7c79100ed770["channelRead()"] 6784d673_612f_ff75_025d_f5a9bf196079["WebSocketServerExtensionHandler"] d87ca89c_b75d_4af9_10fe_7c79100ed770 -->|defined in| 6784d673_612f_ff75_025d_f5a9bf196079 ab797153_cccc_b452_0bd5_51510aadbadf["onHttpRequestChannelRead()"] ab797153_cccc_b452_0bd5_51510aadbadf -->|calls| d87ca89c_b75d_4af9_10fe_7c79100ed770 ab797153_cccc_b452_0bd5_51510aadbadf["onHttpRequestChannelRead()"] d87ca89c_b75d_4af9_10fe_7c79100ed770 -->|calls| ab797153_cccc_b452_0bd5_51510aadbadf style d87ca89c_b75d_4af9_10fe_7c79100ed770 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java lines 69–89
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
// JDK type checks vs non-implemented interfaces costs O(N), where
// N is the number of interfaces already implemented by the concrete type that's being tested.
// The only requirement for this call is to make HttpRequest(s) implementors to call onHttpRequestChannelRead
// and super.channelRead the others, but due to the O(n) cost we perform few fast-path for commonly met
// singleton and/or concrete types, to save performing such slow type checks.
if (msg != LastHttpContent.EMPTY_LAST_CONTENT) {
if (msg instanceof DefaultHttpRequest) {
// fast-path
onHttpRequestChannelRead(ctx, (DefaultHttpRequest) msg);
} else if (msg instanceof HttpRequest) {
// slow path
onHttpRequestChannelRead(ctx, (HttpRequest) msg);
} else {
super.channelRead(ctx, msg);
}
} else {
super.channelRead(ctx, msg);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does channelRead() do?
channelRead() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java.
Where is channelRead() defined?
channelRead() is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketServerExtensionHandler.java at line 69.
What does channelRead() call?
channelRead() calls 1 function(s): onHttpRequestChannelRead.
What calls channelRead()?
channelRead() is called by 1 function(s): onHttpRequestChannelRead.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free