Search in sources :

Example 1 with JettyAlpnProvider

use of io.undertow.protocols.alpn.JettyAlpnProvider in project undertow by undertow-io.

the class DefaultServer method isAlpnEnabled.

private static boolean isAlpnEnabled() {
    if (alpnEnabled == null) {
        SSLEngine engine = getServerSslContext().createSSLEngine();
        ALPNProvider provider = ALPNManager.INSTANCE.getProvider(engine);
        if (provider instanceof JettyAlpnProvider) {
            alpnEnabled = System.getProperty("alpn-boot-string") != null;
        } else {
            alpnEnabled = provider != null;
        }
    }
    return alpnEnabled;
}
Also used : ALPNProvider(io.undertow.protocols.alpn.ALPNProvider) SSLEngine(javax.net.ssl.SSLEngine) JettyAlpnProvider(io.undertow.protocols.alpn.JettyAlpnProvider)

Aggregations

ALPNProvider (io.undertow.protocols.alpn.ALPNProvider)1 JettyAlpnProvider (io.undertow.protocols.alpn.JettyAlpnProvider)1 SSLEngine (javax.net.ssl.SSLEngine)1