forwardOnFailure() — netty Function Reference
Architecture documentation for the forwardOnFailure() function in HttpClientUpgradeHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a39efc99_c313_d8c8_5c01_14d1598082ff["forwardOnFailure()"] 64e7cef3_ca61_31ce_7834_0d1da2dc4960["HttpClientUpgradeHandlerTest"] a39efc99_c313_d8c8_5c01_14d1598082ff -->|defined in| 64e7cef3_ca61_31ce_7834_0d1da2dc4960 style a39efc99_c313_d8c8_5c01_14d1598082ff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java lines 245–267
@Test
public void forwardOnFailure() {
HttpClientUpgradeHandler.SourceCodec sourceCodec = new FakeSourceCodec();
HttpClientUpgradeHandler.UpgradeCodec upgradeCodec = new FakeUpgradeCodec();
HttpClientUpgradeHandler handler = new HttpClientUpgradeHandler(sourceCodec, upgradeCodec, 1024);
final EmbeddedChannel channel = new EmbeddedChannel();
channel.pipeline().addFirst("upgrade", handler);
assertTrue(channel.writeOutbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "netty.io")));
FullHttpRequest request = channel.readOutbound();
assertTrue(request.release());
DefaultHttpResponse response = new DefaultHttpResponse(
HttpVersion.HTTP_1_1, HttpResponseStatus.SWITCHING_PROTOCOLS);
response.headers().add(HttpHeaderNames.UPGRADE, "");
assertFalse(channel.writeInbound(response));
assertThrows(IllegalStateException.class, () -> channel.writeInbound(LastHttpContent.EMPTY_LAST_CONTENT));
FullHttpResponse full = channel.readInbound();
assertTrue(full.release());
assertFalse(channel.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does forwardOnFailure() do?
forwardOnFailure() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java.
Where is forwardOnFailure() defined?
forwardOnFailure() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java at line 245.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free