noRstFrameSentOnCloseViaListener() — netty Function Reference
Architecture documentation for the noRstFrameSentOnCloseViaListener() function in Http2MultiplexTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 28a6a39e_f11d_8cca_1164_0b0a2ea9d968["noRstFrameSentOnCloseViaListener()"] 4745ff96_ed57_3bd8_9861_4b786d0b6e09["Http2MultiplexTest"] 28a6a39e_f11d_8cca_1164_0b0a2ea9d968 -->|defined in| 4745ff96_ed57_3bd8_9861_4b786d0b6e09 22928953_49fc_cbc5_c75c_f236ce1e1fc7["eqStreamId()"] 28a6a39e_f11d_8cca_1164_0b0a2ea9d968 -->|calls| 22928953_49fc_cbc5_c75c_f236ce1e1fc7 style 28a6a39e_f11d_8cca_1164_0b0a2ea9d968 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java lines 261–334
@ParameterizedTest
@EnumSource(RstFrameTestMode.class)
void noRstFrameSentOnCloseViaListener(final RstFrameTestMode mode) throws Exception {
LastInboundHandler inboundHandler = new LastInboundHandler() {
private boolean headersReceived;
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
try {
final boolean endStream;
if (msg instanceof Http2HeadersFrame) {
endStream = ((Http2HeadersFrame) msg).isEndStream();
switch (mode) {
case HEADERS_END_STREAM:
assertFalse(headersReceived);
assertTrue(endStream);
break;
case TRAILERS_END_STREAM:
if (headersReceived) {
assertTrue(endStream);
} else {
assertFalse(endStream);
}
break;
case DATA_END_STREAM:
assertFalse(endStream);
break;
default:
fail();
}
headersReceived = true;
} else if (msg instanceof Http2DataFrame) {
endStream = ((Http2DataFrame) msg).isEndStream();
switch (mode) {
case HEADERS_END_STREAM:
fail();
break;
case TRAILERS_END_STREAM:
assertFalse(endStream);
break;
case DATA_END_STREAM:
assertTrue(endStream);
break;
default:
fail();
}
} else {
throw new UnsupportedMessageTypeException(msg);
}
if (endStream) {
ctx.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers(), true, 0))
.addListener(ChannelFutureListener.CLOSE);
}
} finally {
ReferenceCountUtil.release(msg);
}
}
};
Http2StreamChannel channel = newInboundStream(3, mode == RstFrameTestMode.HEADERS_END_STREAM, inboundHandler);
if (mode != RstFrameTestMode.HEADERS_END_STREAM) {
frameInboundWriter.writeInboundData(
channel.stream().id(), bb("something"), 0, mode == RstFrameTestMode.DATA_END_STREAM);
if (mode != RstFrameTestMode.DATA_END_STREAM) {
frameInboundWriter.writeInboundHeaders(channel.stream().id(), new DefaultHttp2Headers(), 0, true);
}
}
channel.closeFuture().syncUninterruptibly();
// We should never produce a RST frame in this case as we received the endOfStream before we write a frame
// with the endOfStream flag.
verify(frameWriter, never()).writeRstStream(eqCodecCtx(),
eqStreamId(channel), anyLong(), anyChannelPromise());
inboundHandler.checkException();
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does noRstFrameSentOnCloseViaListener() do?
noRstFrameSentOnCloseViaListener() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java.
Where is noRstFrameSentOnCloseViaListener() defined?
noRstFrameSentOnCloseViaListener() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java at line 261.
What does noRstFrameSentOnCloseViaListener() call?
noRstFrameSentOnCloseViaListener() calls 1 function(s): eqStreamId.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free