LazyChannelPromise Class — netty Architecture
Architecture documentation for the LazyChannelPromise class in SslHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f0ccbe5b_17b6_f018_45e5_3edfebdb17fc["LazyChannelPromise"] cdb86368_ae5f_5721_2e99_c3d0ec92017f["SslHandler.java"] f0ccbe5b_17b6_f018_45e5_3edfebdb17fc -->|defined in| cdb86368_ae5f_5721_2e99_c3d0ec92017f 9b5bfec0_6873_af0d_5a3c_3327e6706fa5["EventExecutor()"] f0ccbe5b_17b6_f018_45e5_3edfebdb17fc -->|method| 9b5bfec0_6873_af0d_5a3c_3327e6706fa5 929123a6_cbbf_2997_c536_7103f0009ac0["checkDeadLock()"] f0ccbe5b_17b6_f018_45e5_3edfebdb17fc -->|method| 929123a6_cbbf_2997_c536_7103f0009ac0
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslHandler.java lines 2451–2474
private final class LazyChannelPromise extends DefaultPromise<Channel> {
@Override
protected EventExecutor executor() {
if (ctx == null) {
throw new IllegalStateException();
}
return ctx.executor();
}
@Override
protected void checkDeadLock() {
if (ctx == null) {
// If ctx is null the handlerAdded(...) callback was not called, in this case the checkDeadLock()
// method was called from another Thread then the one that is used by ctx.executor(). We need to
// guard against this as a user can see a race if handshakeFuture().sync() is called but the
// handlerAdded(..) method was not yet as it is called from the EventExecutor of the
// ChannelHandlerContext. If we not guard against this super.checkDeadLock() would cause an
// IllegalStateException when trying to call executor().
return;
}
super.checkDeadLock();
}
}
Source
Frequently Asked Questions
What is the LazyChannelPromise class?
LazyChannelPromise is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java.
Where is LazyChannelPromise defined?
LazyChannelPromise is defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java at line 2451.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free