protected ThirdPartyAlpnNegotiator tryToRegisterAlpnNegotiator ( SSLEngine engine , SSLConnectionLink link , boolean useAlpn ) { if ( isNativeAlpnActive ( ) ) { if ( useAlpn ) { registerNativeAlpn ( engine ) ; } } else if ( isIbmAlpnActive ( ) ) { registerIbmAlpn ( engine , useAlpn ) ; } else if ( this . isJettyAlpnActive ( ) && useAlpn ) { return registerJettyAlpn ( engine , link ) ; } else if ( this . isGrizzlyAlpnActive ( ) && useAlpn ) { return registerGrizzlyAlpn ( engine , link ) ; } return null ; }
Check for the Java 9 ALPN API IBM s ALPNJSSEExt jetty - alpn and grizzly - npn ; if any are present set up the connection for ALPN . Order of preference is Java 9 ALPN API IBM s ALPNJSSEExt jetty - alpn then grizzly - npn .