testRemoveItselfIfNoSslHandlerPresent() — netty Function Reference
Architecture documentation for the testRemoveItselfIfNoSslHandlerPresent() function in ApplicationProtocolNegotiationHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d5d49c51_ba7f_2e7b_9b8c_55c245131153["testRemoveItselfIfNoSslHandlerPresent()"] 6a59c536_b4df_055a_02c9_49ed1745fd53["ApplicationProtocolNegotiationHandlerTest"] d5d49c51_ba7f_2e7b_9b8c_55c245131153 -->|defined in| 6a59c536_b4df_055a_02c9_49ed1745fd53 style d5d49c51_ba7f_2e7b_9b8c_55c245131153 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandlerTest.java lines 46–71
@Test
public void testRemoveItselfIfNoSslHandlerPresent() throws NoSuchAlgorithmException {
ChannelHandler alpnHandler = new ApplicationProtocolNegotiationHandler(ApplicationProtocolNames.HTTP_1_1) {
@Override
protected void configurePipeline(ChannelHandlerContext ctx, String protocol) {
fail();
}
};
SSLEngine engine = SSLContext.getDefault().createSSLEngine();
// This test is mocked/simulated and doesn't go through full TLS handshake. Currently only JDK SSLEngineImpl
// client mode will generate a close_notify.
engine.setUseClientMode(true);
EmbeddedChannel channel = new EmbeddedChannel(alpnHandler);
String msg = "msg";
String msg2 = "msg2";
assertTrue(channel.writeInbound(msg));
assertTrue(channel.writeInbound(msg2));
assertNull(channel.pipeline().context(alpnHandler));
assertEquals(msg, channel.readInbound());
assertEquals(msg2, channel.readInbound());
assertFalse(channel.finishAndReleaseAll());
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testRemoveItselfIfNoSslHandlerPresent() do?
testRemoveItselfIfNoSslHandlerPresent() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandlerTest.java.
Where is testRemoveItselfIfNoSslHandlerPresent() defined?
testRemoveItselfIfNoSslHandlerPresent() is defined in handler/src/test/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandlerTest.java at line 46.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free