protected JettyServerNegotiator registerJettyAlpn ( final SSLEngine engine , SSLConnectionLink link ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "registerJettyAlpn entry " + engine ) ; } try { JettyServerNegotiator negotiator = new JettyServerNegotiator ( engine , link ) ; // invoke ALPN.put(engine, provider(this)) Method m = jettyAlpn . getMethod ( "put" , SSLEngine . class , jettyProviderInterface ) ; m . invoke ( null , new Object [ ] { engine , java . lang . reflect . Proxy . newProxyInstance ( jettyServerProviderInterface . getClassLoader ( ) , new java . lang . Class [ ] { jettyServerProviderInterface } , negotiator ) } ) ; return negotiator ; } catch ( InvocationTargetException ie ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "registerJettyAlpn exception: " + ie . getTargetException ( ) ) ; } } catch ( Exception e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "registerJettyAlpn jetty-alpn exception: " + e ) ; } } return null ; }
Using jetty - alpn set up a new JettyServerNotiator to handle ALPN for a given SSLEngine and link