resumeOnEventExecutor() — netty Function Reference
Architecture documentation for the resumeOnEventExecutor() function in SslHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb["resumeOnEventExecutor()"] 4971d882_98ff_3ffd_f66b_31ea649497b3["SslTasksRunner"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|defined in| 4971d882_98ff_3ffd_f66b_31ea649497b3 cb55a9c1_7a30_c86d_8180_17c1a46f16de["runComplete()"] cb55a9c1_7a30_c86d_8180_17c1a46f16de -->|calls| 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb c424fd0b_8c85_a9c8_f54b_4dd373f93722["inEventLoop()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| c424fd0b_8c85_a9c8_f54b_4dd373f93722 5fccc820_4d5c_02e0_7572_31b2a69fd790["clearState()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 5fccc820_4d5c_02e0_7572_31b2a69fd790 d5c0dc3b_c9c6_3584_a1bf_3d5d471c5803["executeDelegatedTask()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| d5c0dc3b_c9c6_3584_a1bf_3d5d471c5803 412a41a8_6a03_f301_fa41_1d7e9d8ad668["setHandshakeSuccess()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 412a41a8_6a03_f301_fa41_1d7e9d8ad668 ca3c58ac_45a7_24e9_d74b_140cea69627e["wrap()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| ca3c58ac_45a7_24e9_d74b_140cea69627e 8cae5f97_939d_55fc_31c2_c6131add51c2["taskError()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 8cae5f97_939d_55fc_31c2_c6131add51c2 1e626fd1_be04_3828_22be_f23dbb77f38a["unwrapNonAppData()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 1e626fd1_be04_3828_22be_f23dbb77f38a 97e069a2_d061_156b_5f87_33bbcfd62f59["forceFlush()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 97e069a2_d061_156b_5f87_33bbcfd62f59 f221057f_9b44_cc50_e4e5_62605fce7fe9["tryDecodeAgain()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| f221057f_9b44_cc50_e4e5_62605fce7fe9 1807eec1_6f0b_edf4_8d02_a6d15d3c18c1["handleUnwrapThrowable()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 1807eec1_6f0b_edf4_8d02_a6d15d3c18c1 5759ad29_b25e_dc08_15d9_5d7a84356f31["wrapNonAppData()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 5759ad29_b25e_dc08_15d9_5d7a84356f31 51b61e7d_0f6d_53c7_ed6a_56a55b2ed5a7["unwrap()"] 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb -->|calls| 51b61e7d_0f6d_53c7_ed6a_56a55b2ed5a7 style 3767fed6_8ef0_e61c_ca65_bd1e0902b8bb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslHandler.java lines 1838–1918
private void resumeOnEventExecutor() {
assert ctx.executor().inEventLoop();
clearState(STATE_PROCESS_TASK);
try {
HandshakeStatus status = engine.getHandshakeStatus();
switch (status) {
// There is another task that needs to be executed and offloaded to the delegatingTaskExecutor as
// a result of this. Let's reschedule....
case NEED_TASK:
executeDelegatedTask(this);
break;
// The handshake finished, lets notify about the completion of it and resume processing.
case FINISHED:
// Not handshaking anymore, lets notify about the completion if not done yet and resume processing.
case NOT_HANDSHAKING:
setHandshakeSuccess(); // NOT_HANDSHAKING -> workaround for android skipping FINISHED state.
try {
// Lets call wrap to ensure we produce the alert if there is any pending and also to
// ensure we flush any queued data..
wrap(ctx, inUnwrap);
} catch (Throwable e) {
taskError(e);
return;
}
if (inUnwrap) {
// If we were in the unwrap call when the task was processed we should also try to unwrap
// non app data first as there may not anything left in the inbound buffer to process.
unwrapNonAppData(ctx);
}
// Flush now as we may have written some data as part of the wrap call.
forceFlush(ctx);
tryDecodeAgain();
break;
// We need more data so lets try to unwrap first and then call decode again which will feed us
// with buffered data (if there is any).
case NEED_UNWRAP:
try {
unwrapNonAppData(ctx);
} catch (SSLException e) {
handleUnwrapThrowable(ctx, e);
return;
}
tryDecodeAgain();
break;
// To make progress we need to call SSLEngine.wrap(...) which may produce more output data
// that will be written to the Channel.
case NEED_WRAP:
try {
if (!wrapNonAppData(ctx, false) && inUnwrap) {
// The handshake finished in wrapNonAppData(...), we need to try call
// unwrapNonAppData(...) as we may have some alert that we should read.
//
// This mimics what we would do when we are calling this method while in unwrap(...).
unwrapNonAppData(ctx);
}
// Flush now as we may have written some data as part of the wrap call.
forceFlush(ctx);
} catch (Throwable e) {
taskError(e);
return;
}
// Now try to feed in more data that we have buffered.
tryDecodeAgain();
break;
default:
// Should never reach here as we handle all cases.
throw new AssertionError();
}
} catch (Throwable cause) {
safeExceptionCaught(cause);
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does resumeOnEventExecutor() do?
resumeOnEventExecutor() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java.
Where is resumeOnEventExecutor() defined?
resumeOnEventExecutor() is defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java at line 1838.
What does resumeOnEventExecutor() call?
resumeOnEventExecutor() calls 13 function(s): clearState, executeDelegatedTask, forceFlush, handleUnwrapThrowable, inEventLoop, safeExceptionCaught, setHandshakeSuccess, taskError, and 5 more.
What calls resumeOnEventExecutor()?
resumeOnEventExecutor() is called by 1 function(s): runComplete.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free