upgradeWithoutFlowControlling() — netty Function Reference
Architecture documentation for the upgradeWithoutFlowControlling() function in Http2FrameCodecTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8b231ac3_d3a3_17ec_c9f2_6814cc11ea0f["upgradeWithoutFlowControlling()"] 71f17950_8fc4_c3e9_2e13_384d1ac7ea2c["Http2FrameCodecTest"] 8b231ac3_d3a3_17ec_c9f2_6814cc11ea0f -->|defined in| 71f17950_8fc4_c3e9_2e13_384d1ac7ea2c ac3960d8_d50a_27be_9b03_c7fa82c9a524["String()"] 8b231ac3_d3a3_17ec_c9f2_6814cc11ea0f -->|calls| ac3960d8_d50a_27be_9b03_c7fa82c9a524 style 8b231ac3_d3a3_17ec_c9f2_6814cc11ea0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java lines 933–969
@Test
public void upgradeWithoutFlowControlling() throws Exception {
channel.pipeline().addAfter(frameCodec.ctx.name(), null, new ChannelInboundHandlerAdapter() {
@Override
public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof Http2DataFrame) {
// Simulate consuming the frame and update the flow-controller.
Http2DataFrame data = (Http2DataFrame) msg;
ctx.writeAndFlush(new DefaultHttp2WindowUpdateFrame(data.initialFlowControlledBytes())
.stream(data.stream())).addListener(future -> {
Throwable cause = future.cause();
if (cause != null) {
ctx.fireExceptionCaught(cause);
}
});
}
ReferenceCountUtil.release(msg);
}
});
frameInboundWriter.writeInboundHeaders(Http2CodecUtil.HTTP_UPGRADE_STREAM_ID, request, 31, false);
// Using reflect as the constructor is package-private and the class is final.
Constructor<UpgradeEvent> constructor =
UpgradeEvent.class.getDeclaredConstructor(CharSequence.class, FullHttpRequest.class);
// Check if we could make it accessible which may fail on java9.
Assumptions.assumeTrue(ReflectionUtil.trySetAccessible(constructor, true) == null);
String longString = new String(new char[70000]).replace("\0", "*");
DefaultFullHttpRequest request =
new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/", bb(longString));
HttpServerUpgradeHandler.UpgradeEvent upgradeEvent = constructor.newInstance(
"HTTP/2", request);
channel.pipeline().fireUserEventTriggered(upgradeEvent);
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does upgradeWithoutFlowControlling() do?
upgradeWithoutFlowControlling() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java.
Where is upgradeWithoutFlowControlling() defined?
upgradeWithoutFlowControlling() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java at line 933.
What does upgradeWithoutFlowControlling() call?
upgradeWithoutFlowControlling() calls 1 function(s): String.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free