handleReadException() — netty Function Reference
Architecture documentation for the handleReadException() function in AbstractNioByteChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a63e69b1_c5a7_0e05_79bc_163803b55680["handleReadException()"] f52609a8_b5d5_f9b7_0a87_06421659d477["NioByteUnsafe"] a63e69b1_c5a7_0e05_79bc_163803b55680 -->|defined in| f52609a8_b5d5_f9b7_0a87_06421659d477 eafbe12c_ddc4_fdfc_7207_cbb526f9b297["read()"] eafbe12c_ddc4_fdfc_7207_cbb526f9b297 -->|calls| a63e69b1_c5a7_0e05_79bc_163803b55680 216aa50a_4b2e_d203_0a18_d38f61e1dd7e["closeOnRead()"] a63e69b1_c5a7_0e05_79bc_163803b55680 -->|calls| 216aa50a_4b2e_d203_0a18_d38f61e1dd7e style a63e69b1_c5a7_0e05_79bc_163803b55680 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java lines 116–142
private void handleReadException(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean close,
RecvByteBufAllocator.Handle allocHandle) {
if (byteBuf != null) {
if (byteBuf.isReadable()) {
readPending = false;
try {
pipeline.fireChannelRead(byteBuf);
} catch (Exception e) {
cause.addSuppressed(e);
}
} else {
byteBuf.release();
}
}
allocHandle.readComplete();
pipeline.fireChannelReadComplete();
pipeline.fireExceptionCaught(cause);
// If oom will close the read event, release connection.
// See https://github.com/netty/netty/issues/10434
if (close ||
cause instanceof OutOfMemoryError ||
cause instanceof LeakPresenceDetector.AllocationProhibitedException ||
cause instanceof IOException) {
closeOnRead(pipeline);
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does handleReadException() do?
handleReadException() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java.
Where is handleReadException() defined?
handleReadException() is defined in transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java at line 116.
What does handleReadException() call?
handleReadException() calls 1 function(s): closeOnRead.
What calls handleReadException()?
handleReadException() is called by 1 function(s): read.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free