channelClosedWhenCloseListenerCompletes() — netty Function Reference
Architecture documentation for the channelClosedWhenCloseListenerCompletes() function in Http2MultiplexTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7dd49f0a_b747_6aed_e9e8_f9f03affa2c2["channelClosedWhenCloseListenerCompletes()"] 4745ff96_ed57_3bd8_9861_4b786d0b6e09["Http2MultiplexTest"] 7dd49f0a_b747_6aed_e9e8_f9f03affa2c2 -->|defined in| 4745ff96_ed57_3bd8_9861_4b786d0b6e09 style 7dd49f0a_b747_6aed_e9e8_f9f03affa2c2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java lines 977–1000
@Test
public void channelClosedWhenCloseListenerCompletes() {
LastInboundHandler inboundHandler = new LastInboundHandler();
Http2StreamChannel childChannel = newInboundStream(3, false, inboundHandler);
assertTrue(childChannel.isOpen());
assertTrue(childChannel.isActive());
final AtomicBoolean channelOpen = new AtomicBoolean(true);
final AtomicBoolean channelActive = new AtomicBoolean(true);
// Create a promise before actually doing the close, because otherwise we would be adding a listener to a future
// that is already completed because we are using EmbeddedChannel which executes code in the JUnit thread.
ChannelPromise p = childChannel.newPromise();
p.addListener((ChannelFutureListener) future -> {
channelOpen.set(future.channel().isOpen());
channelActive.set(future.channel().isActive());
});
childChannel.close(p).syncUninterruptibly();
assertFalse(channelOpen.get());
assertFalse(channelActive.get());
assertFalse(childChannel.isActive());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does channelClosedWhenCloseListenerCompletes() do?
channelClosedWhenCloseListenerCompletes() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java.
Where is channelClosedWhenCloseListenerCompletes() defined?
channelClosedWhenCloseListenerCompletes() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java at line 977.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free