run() — netty Function Reference
Architecture documentation for the run() function in IdleStateHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c01fe946_a27f_cfb8_3f5d_34cb94e87380["run()"] 9e40c465_2340_2b3b_aba1_859254f9b851["ReaderIdleTimeoutTask"] c01fe946_a27f_cfb8_3f5d_34cb94e87380 -->|defined in| 9e40c465_2340_2b3b_aba1_859254f9b851 eed714e2_34ef_ccc1_8c8a_aba0248bf6b5["run()"] eed714e2_34ef_ccc1_8c8a_aba0248bf6b5 -->|calls| c01fe946_a27f_cfb8_3f5d_34cb94e87380 e78add08_1046_b6ba_50ae_fcb7b2726698["schedule()"] c01fe946_a27f_cfb8_3f5d_34cb94e87380 -->|calls| e78add08_1046_b6ba_50ae_fcb7b2726698 9230f1b6_4a4d_227b_68b5_2586a81b4dd5["channelIdle()"] c01fe946_a27f_cfb8_3f5d_34cb94e87380 -->|calls| 9230f1b6_4a4d_227b_68b5_2586a81b4dd5 eed714e2_34ef_ccc1_8c8a_aba0248bf6b5["run()"] c01fe946_a27f_cfb8_3f5d_34cb94e87380 -->|calls| eed714e2_34ef_ccc1_8c8a_aba0248bf6b5 style c01fe946_a27f_cfb8_3f5d_34cb94e87380 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java lines 501–525
@Override
protected void run(ChannelHandlerContext ctx) {
long nextDelay = readerIdleTimeNanos;
if (!reading) {
nextDelay -= ticker.nanoTime() - lastReadTime;
}
if (nextDelay <= 0) {
// Reader is idle - set a new timeout and notify the callback.
readerIdleTimeout = schedule(ctx, this, readerIdleTimeNanos, TimeUnit.NANOSECONDS);
boolean first = firstReaderIdleEvent;
firstReaderIdleEvent = false;
try {
IdleStateEvent event = newIdleStateEvent(IdleState.READER_IDLE, first);
channelIdle(ctx, event);
} catch (Throwable t) {
ctx.fireExceptionCaught(t);
}
} else {
// Read occurred before the timeout - set a new timeout with shorter delay.
readerIdleTimeout = schedule(ctx, this, nextDelay, TimeUnit.NANOSECONDS);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does run() do?
run() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java.
Where is run() defined?
run() is defined in handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java at line 501.
What does run() call?
run() calls 3 function(s): channelIdle, run, schedule.
What calls run()?
run() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free