Home / Function/ addCloseListener() — netty Function Reference

addCloseListener() — netty Function Reference

Architecture documentation for the addCloseListener() function in SslHandler.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  fb8059d2_577d_b68e_bcd7_2caea40df1e0["addCloseListener()"]
  d8b07a7c_44f8_c4e9_efe8_49bfae7d4af1["SslHandler"]
  fb8059d2_577d_b68e_bcd7_2caea40df1e0 -->|defined in| d8b07a7c_44f8_c4e9_efe8_49bfae7d4af1
  e7a7ecf5_bbaa_6525_0168_c2a3b76d209d["safeClose()"]
  e7a7ecf5_bbaa_6525_0168_c2a3b76d209d -->|calls| fb8059d2_577d_b68e_bcd7_2caea40df1e0
  49028cb7_a127_0716_20ed_4fc1e1c7c988["close()"]
  fb8059d2_577d_b68e_bcd7_2caea40df1e0 -->|calls| 49028cb7_a127_0716_20ed_4fc1e1c7c988
  style fb8059d2_577d_b68e_bcd7_2caea40df1e0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/ssl/SslHandler.java lines 2408–2416

    private static void addCloseListener(ChannelFuture future, ChannelPromise promise) {
        // We notify the promise in the ChannelPromiseNotifier as there is a "race" where the close(...) call
        // by the timeoutFuture and the close call in the flushFuture listener will be called. Because of
        // this we need to use trySuccess() and tryFailure(...) as otherwise we can cause an
        // IllegalStateException.
        // Also we not want to log if the notification happens as this is expected in some cases.
        // See https://github.com/netty/netty/issues/5598
        PromiseNotifier.cascade(false, future, promise);
    }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does addCloseListener() do?
addCloseListener() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java.
Where is addCloseListener() defined?
addCloseListener() is defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java at line 2408.
What does addCloseListener() call?
addCloseListener() calls 1 function(s): close.
What calls addCloseListener()?
addCloseListener() is called by 1 function(s): safeClose.

Analyze Your Own Codebase

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

Try Supermodel Free