fireChannelInactiveAndDeregister() — netty Function Reference
Architecture documentation for the fireChannelInactiveAndDeregister() function in AbstractHttp2StreamChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 392e63a7_22b4_b12e_e643_274bcc99a5bf["fireChannelInactiveAndDeregister()"] 2656dcfe_5cdb_7c7d_bc25_312393fe2e05["Http2ChannelUnsafe"] 392e63a7_22b4_b12e_e643_274bcc99a5bf -->|defined in| 2656dcfe_5cdb_7c7d_bc25_312393fe2e05 215b8316_feb5_500b_88f8_49eff0eac336["close()"] 215b8316_feb5_500b_88f8_49eff0eac336 -->|calls| 392e63a7_22b4_b12e_e643_274bcc99a5bf 0c2d25a1_4b0f_f8bb_685e_513d76901377["deregister()"] 0c2d25a1_4b0f_f8bb_685e_513d76901377 -->|calls| 392e63a7_22b4_b12e_e643_274bcc99a5bf 0c2d25a1_4b0f_f8bb_685e_513d76901377["deregister()"] 392e63a7_22b4_b12e_e643_274bcc99a5bf -->|calls| 0c2d25a1_4b0f_f8bb_685e_513d76901377 b44453f3_32d7_e262_679e_0dfc1635685a["invokeLater()"] 392e63a7_22b4_b12e_e643_274bcc99a5bf -->|calls| b44453f3_32d7_e262_679e_0dfc1635685a 8c56fb74_b80c_02ad_25a4_65eb61eff7ea["safeSetSuccess()"] 392e63a7_22b4_b12e_e643_274bcc99a5bf -->|calls| 8c56fb74_b80c_02ad_25a4_65eb61eff7ea style 392e63a7_22b4_b12e_e643_274bcc99a5bf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java lines 779–812
private void fireChannelInactiveAndDeregister(final ChannelPromise promise,
final boolean fireChannelInactive) {
if (!promise.setUncancellable()) {
return;
}
if (!registered) {
promise.setSuccess();
return;
}
// As a user may call deregister() from within any method while doing processing in the ChannelPipeline,
// we need to ensure we do the actual deregister operation later. This is necessary to preserve the
// behavior of the AbstractChannel, which always invokes channelUnregistered and channelInactive
// events 'later' to ensure the current events in the handler are completed before these events.
//
// See:
// https://github.com/netty/netty/issues/4435
invokeLater(promise.channel(), new Runnable() {
@Override
public void run() {
if (fireChannelInactive) {
pipeline.fireChannelInactive();
}
// The user can fire `deregister` events multiple times but we only want to fire the pipeline
// event if the channel was actually registered.
if (registered) {
registered = false;
pipeline.fireChannelUnregistered();
}
safeSetSuccess(promise);
}
});
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does fireChannelInactiveAndDeregister() do?
fireChannelInactiveAndDeregister() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java.
Where is fireChannelInactiveAndDeregister() defined?
fireChannelInactiveAndDeregister() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java at line 779.
What does fireChannelInactiveAndDeregister() call?
fireChannelInactiveAndDeregister() calls 3 function(s): deregister, invokeLater, safeSetSuccess.
What calls fireChannelInactiveAndDeregister()?
fireChannelInactiveAndDeregister() is called by 2 function(s): close, deregister.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free