AlpnWrapper Class — netty Architecture
Architecture documentation for the AlpnWrapper class in JdkAlpnApplicationProtocolNegotiator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 6379d8e2_1f92_9548_3e09_e26aace3be1f["AlpnWrapper"] 3ca15c7f_1a43_6ede_7980_b5d11c6a55d1["JdkAlpnApplicationProtocolNegotiator.java"] 6379d8e2_1f92_9548_3e09_e26aace3be1f -->|defined in| 3ca15c7f_1a43_6ede_7980_b5d11c6a55d1 c262cf8f_ab12_c8ee_406c_a496cbd32aab["SSLEngine()"] 6379d8e2_1f92_9548_3e09_e26aace3be1f -->|method| c262cf8f_ab12_c8ee_406c_a496cbd32aab
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java lines 127–148
private static final class AlpnWrapper extends AllocatorAwareSslEngineWrapperFactory {
@Override
public SSLEngine wrapSslEngine(SSLEngine engine, ByteBufAllocator alloc,
JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer) {
if (Conscrypt.isEngineSupported(engine)) {
return isServer ? ConscryptAlpnSslEngine.newServerEngine(engine, alloc, applicationNegotiator)
: ConscryptAlpnSslEngine.newClientEngine(engine, alloc, applicationNegotiator);
}
if (BouncyCastleUtil.isBcJsseInUse(engine) && BouncyCastleAlpnSslUtils.isAlpnSupported()) {
return new BouncyCastleAlpnSslEngine(engine, applicationNegotiator, isServer);
}
// ALPN support was recently backported to Java8 as
// https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8230977.
// Because of this lets not do a Java version runtime check but just depend on if the required methods are
// present
if (JdkAlpnSslUtils.supportsAlpn()) {
return new JdkAlpnSslEngine(engine, applicationNegotiator, isServer);
}
throw new UnsupportedOperationException("ALPN not supported. Unable to wrap SSLEngine of type '"
+ engine.getClass().getName() + "')");
}
}
Source
Frequently Asked Questions
What is the AlpnWrapper class?
AlpnWrapper is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java.
Where is AlpnWrapper defined?
AlpnWrapper is defined in handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java at line 127.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free