Home / Function/ fulfillConnectPromise() — netty Function Reference

fulfillConnectPromise() — netty Function Reference

Architecture documentation for the fulfillConnectPromise() function in AbstractKQueueChannel.java from the netty codebase.

Function java Buffer Search calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  65cda6eb_54fc_08fa_109d_821dc9e4f73a["fulfillConnectPromise()"]
  db95214c_090e_b762_6cfd_37721de6cf7b["AbstractKQueueUnsafe"]
  65cda6eb_54fc_08fa_109d_821dc9e4f73a -->|defined in| db95214c_090e_b762_6cfd_37721de6cf7b
  bbd7c9c1_c4bc_de70_f8db_d09f08d2b040["connect()"]
  bbd7c9c1_c4bc_de70_f8db_d09f08d2b040 -->|calls| 65cda6eb_54fc_08fa_109d_821dc9e4f73a
  97feab9f_5cb3_069e_ea7d_d44ef47a0e25["finishConnect()"]
  97feab9f_5cb3_069e_ea7d_d44ef47a0e25 -->|calls| 65cda6eb_54fc_08fa_109d_821dc9e4f73a
  684a2bb9_79af_cb54_06e1_79f3ed633d1c["isActive()"]
  65cda6eb_54fc_08fa_109d_821dc9e4f73a -->|calls| 684a2bb9_79af_cb54_06e1_79f3ed633d1c
  6cfc6ba6_4961_3030_0b05_046c480b76d2["close()"]
  65cda6eb_54fc_08fa_109d_821dc9e4f73a -->|calls| 6cfc6ba6_4961_3030_0b05_046c480b76d2
  style 65cda6eb_54fc_08fa_109d_821dc9e4f73a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java lines 613–637

        private void fulfillConnectPromise(ChannelPromise promise, boolean wasActive) {
            if (promise == null) {
                // Closed via cancellation and the promise has been notified already.
                return;
            }
            active = true;

            // Get the state as trySuccess() may trigger an ChannelFutureListener that will close the Channel.
            // We still need to ensure we call fireChannelActive() in this case.
            boolean active = isActive();

            // trySuccess() will return false if a user cancelled the connection attempt.
            boolean promiseSet = promise.trySuccess();

            // Regardless if the connection attempt was cancelled, channelActive() event should be triggered,
            // because what happened is what happened.
            if (!wasActive && active) {
                pipeline().fireChannelActive();
            }

            // If a user cancelled the connection attempt, close the channel, which is followed by channelInactive().
            if (!promiseSet) {
                close(voidPromise());
            }
        }

Domain

Subdomains

Frequently Asked Questions

What does fulfillConnectPromise() do?
fulfillConnectPromise() is a function in the netty codebase, defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java.
Where is fulfillConnectPromise() defined?
fulfillConnectPromise() is defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java at line 613.
What does fulfillConnectPromise() call?
fulfillConnectPromise() calls 2 function(s): close, isActive.
What calls fulfillConnectPromise()?
fulfillConnectPromise() is called by 2 function(s): connect, finishConnect.

Analyze Your Own Codebase

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

Try Supermodel Free