fulfillConnectPromise() — netty Function Reference
Architecture documentation for the fulfillConnectPromise() function in AbstractNioChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 123c8fda_87a2_fec2_8833_5ca69a354b9a["fulfillConnectPromise()"] 60188589_9b31_b825_db5f_7e5167ad54a1["AbstractNioUnsafe"] 123c8fda_87a2_fec2_8833_5ca69a354b9a -->|defined in| 60188589_9b31_b825_db5f_7e5167ad54a1 7ffc6a56_2e62_6b7e_705f_75d97f5f0b56["connect()"] 7ffc6a56_2e62_6b7e_705f_75d97f5f0b56 -->|calls| 123c8fda_87a2_fec2_8833_5ca69a354b9a 82689713_a74b_195b_07e2_42d37565a5fd["finishConnect()"] 82689713_a74b_195b_07e2_42d37565a5fd -->|calls| 123c8fda_87a2_fec2_8833_5ca69a354b9a 52cb1857_2882_7fd9_866b_ec40ca61b7be["close()"] 123c8fda_87a2_fec2_8833_5ca69a354b9a -->|calls| 52cb1857_2882_7fd9_866b_ec40ca61b7be style 123c8fda_87a2_fec2_8833_5ca69a354b9a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/nio/AbstractNioChannel.java lines 339–362
private void fulfillConnectPromise(ChannelPromise promise, boolean wasActive) {
if (promise == null) {
// Closed via cancellation and the promise has been notified already.
return;
}
// 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
Calls
Called By
Source
Frequently Asked Questions
What does fulfillConnectPromise() do?
fulfillConnectPromise() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/AbstractNioChannel.java.
Where is fulfillConnectPromise() defined?
fulfillConnectPromise() is defined in transport/src/main/java/io/netty/channel/nio/AbstractNioChannel.java at line 339.
What does fulfillConnectPromise() call?
fulfillConnectPromise() calls 1 function(s): close.
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