handlerRemoved0() — netty Function Reference
Architecture documentation for the handlerRemoved0() function in SslHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 77203d11_11d9_72c2_a4ab_2655756047e4["handlerRemoved0()"] d8b07a7c_44f8_c4e9_efe8_49bfae7d4af1["SslHandler"] 77203d11_11d9_72c2_a4ab_2655756047e4 -->|defined in| d8b07a7c_44f8_c4e9_efe8_49bfae7d4af1 16c70aef_a8d5_6d7e_02d1_6d8d8dfe1d58["releaseAndFailAll()"] 77203d11_11d9_72c2_a4ab_2655756047e4 -->|calls| 16c70aef_a8d5_6d7e_02d1_6d8d8dfe1d58 b9490323_35d0_98b8_338b_728f1490d032["notifyClosePromise()"] 77203d11_11d9_72c2_a4ab_2655756047e4 -->|calls| b9490323_35d0_98b8_338b_728f1490d032 style 77203d11_11d9_72c2_a4ab_2655756047e4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslHandler.java lines 717–747
@Override
public void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
try {
if (pendingUnencryptedWrites != null && !pendingUnencryptedWrites.isEmpty()) {
// Check if queue is not empty first because create a new ChannelException is expensive
pendingUnencryptedWrites.releaseAndFailAll(ctx,
new ChannelException("Pending write on removal of SslHandler"));
}
pendingUnencryptedWrites = null;
SSLException cause = null;
// If the handshake or SSLEngine closure is not done yet we should fail corresponding promise and
// notify the rest of the
// pipeline.
if (!handshakePromise.isDone()) {
cause = new SSLHandshakeException("SslHandler removed before handshake completed");
if (handshakePromise.tryFailure(cause)) {
ctx.fireUserEventTriggered(new SslHandshakeCompletionEvent(cause));
}
}
if (!sslClosePromise.isDone()) {
if (cause == null) {
cause = new SSLException("SslHandler removed before SSLEngine was closed");
}
notifyClosePromise(cause);
}
} finally {
ReferenceCountUtil.release(engine);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does handlerRemoved0() do?
handlerRemoved0() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java.
Where is handlerRemoved0() defined?
handlerRemoved0() is defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java at line 717.
What does handlerRemoved0() call?
handlerRemoved0() calls 2 function(s): notifyClosePromise, releaseAndFailAll.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free