safeExecute() — netty Function Reference
Architecture documentation for the safeExecute() function in AbstractChannelHandlerContext.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD bca24481_45c3_570f_6222_6dfa6c8db7ea["safeExecute()"] 219fdd98_e8e7_d4f7_fea0_eba60352e3de["AbstractChannelHandlerContext"] bca24481_45c3_570f_6222_6dfa6c8db7ea -->|defined in| 219fdd98_e8e7_d4f7_fea0_eba60352e3de ecdd9021_5139_5faf_c9e9_00ec51590b75["ChannelFuture()"] ecdd9021_5139_5faf_c9e9_00ec51590b75 -->|calls| bca24481_45c3_570f_6222_6dfa6c8db7ea 9c9ad831_2d8b_b01e_bd08_eb0bcb8e44d7["ChannelHandlerContext()"] 9c9ad831_2d8b_b01e_bd08_eb0bcb8e44d7 -->|calls| bca24481_45c3_570f_6222_6dfa6c8db7ea 99283ae3_ac1e_c2ab_31c8_7eec0221bc1c["write()"] 99283ae3_ac1e_c2ab_31c8_7eec0221bc1c -->|calls| bca24481_45c3_570f_6222_6dfa6c8db7ea style bca24481_45c3_570f_6222_6dfa6c8db7ea fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/AbstractChannelHandlerContext.java lines 1034–1053
private static boolean safeExecute(EventExecutor executor, Runnable runnable,
ChannelPromise promise, Object msg, boolean lazy) {
try {
if (lazy && executor instanceof AbstractEventExecutor) {
((AbstractEventExecutor) executor).lazyExecute(runnable);
} else {
executor.execute(runnable);
}
return true;
} catch (Throwable cause) {
try {
if (msg != null) {
ReferenceCountUtil.release(msg);
}
} finally {
promise.setFailure(cause);
}
return false;
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does safeExecute() do?
safeExecute() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/AbstractChannelHandlerContext.java.
Where is safeExecute() defined?
safeExecute() is defined in transport/src/main/java/io/netty/channel/AbstractChannelHandlerContext.java at line 1034.
What calls safeExecute()?
safeExecute() is called by 3 function(s): ChannelFuture, ChannelHandlerContext, write.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free