Home / Function/ replaceHandler() — netty Function Reference

replaceHandler() — netty Function Reference

Architecture documentation for the replaceHandler() function in SniHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7a87e629_fa8a_5912_ac94_6fc5173193cc["replaceHandler()"]
  1c08698d_6de3_27a1_92a5_6a4c169201cb["SniHandler"]
  7a87e629_fa8a_5912_ac94_6fc5173193cc -->|defined in| 1c08698d_6de3_27a1_92a5_6a4c169201cb
  89cae714_38ff_f2bb_6caf_33da4c9c86ff["onLookupComplete()"]
  89cae714_38ff_f2bb_6caf_33da4c9c86ff -->|calls| 7a87e629_fa8a_5912_ac94_6fc5173193cc
  style 7a87e629_fa8a_5912_ac94_6fc5173193cc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/ssl/SniHandler.java lines 180–194

    protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception {
        SslHandler sslHandler = null;
        try {
            sslHandler = newSslHandler(sslContext, ctx.alloc());
            ctx.pipeline().replace(this, SslHandler.class.getName(), sslHandler);
            sslHandler = null;
        } finally {
            // Since the SslHandler was not inserted into the pipeline the ownership of the SSLEngine was not
            // transferred to the SslHandler.
            // See https://github.com/netty/netty/issues/5678
            if (sslHandler != null) {
                ReferenceCountUtil.safeRelease(sslHandler.engine());
            }
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does replaceHandler() do?
replaceHandler() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SniHandler.java.
Where is replaceHandler() defined?
replaceHandler() is defined in handler/src/main/java/io/netty/handler/ssl/SniHandler.java at line 180.
What calls replaceHandler()?
replaceHandler() is called by 1 function(s): onLookupComplete.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free