handle() — netty Function Reference
Architecture documentation for the handle() function in AbstractKQueueChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9771c7d3_2655_1640_a268_5f99c6abe7f6["handle()"] db95214c_090e_b762_6cfd_37721de6cf7b["AbstractKQueueUnsafe"] 9771c7d3_2655_1640_a268_5f99c6abe7f6 -->|defined in| db95214c_090e_b762_6cfd_37721de6cf7b bb35de56_68d0_f65e_249e_407bce9a4a7b["writeReady()"] 9771c7d3_2655_1640_a268_5f99c6abe7f6 -->|calls| bb35de56_68d0_f65e_249e_407bce9a4a7b a72f411b_4868_de0d_77b8_4bc581d51883["readReady()"] 9771c7d3_2655_1640_a268_5f99c6abe7f6 -->|calls| a72f411b_4868_de0d_77b8_4bc581d51883 2f67cad3_9f57_8aaa_bf51_d7df80344b13["readEOF()"] 9771c7d3_2655_1640_a268_5f99c6abe7f6 -->|calls| 2f67cad3_9f57_8aaa_bf51_d7df80344b13 style 9771c7d3_2655_1640_a268_5f99c6abe7f6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java lines 391–418
@Override
public void handle(IoRegistration registration, IoEvent event) {
KQueueIoEvent kqueueEvent = (KQueueIoEvent) event;
final short filter = kqueueEvent.filter();
final short flags = kqueueEvent.flags();
final int fflags = kqueueEvent.fflags();
final long data = kqueueEvent.data();
// First check for EPOLLOUT as we may need to fail the connect ChannelPromise before try
// to read from the file descriptor.
if (filter == Native.EVFILT_WRITE) {
writeReady();
} else if (filter == Native.EVFILT_READ) {
// Check READ before EOF to ensure all data is read before shutting down the input.
KQueueRecvByteAllocatorHandle allocHandle = recvBufAllocHandle();
readReady(allocHandle);
} else if (filter == Native.EVFILT_SOCK && (fflags & Native.NOTE_RDHUP) != 0) {
readEOF();
return;
}
// Check if EV_EOF was set, this will notify us for connection-reset in which case
// we may close the channel directly or try to read more data depending on the state of the
// Channel and also depending on the AbstractKQueueChannel subtype.
if ((flags & Native.EV_EOF) != 0) {
readEOF();
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does handle() do?
handle() is a function in the netty codebase, defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java.
Where is handle() defined?
handle() is defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java at line 391.
What does handle() call?
handle() calls 3 function(s): readEOF, readReady, writeReady.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free