Class JDK8HackAlpnProvider

java.lang.Object
io.undertow.protocols.alpn.JDK8HackAlpnProvider
All Implemented Interfaces:
ALPNProvider

public class JDK8HackAlpnProvider extends Object implements ALPNProvider
Open listener adaptor for ALPN connections that uses the SSLExplorer based approach and hack into the JDK8 SSLEngine via reflection.
Author:
Stuart Douglas
  • Constructor Details

    • JDK8HackAlpnProvider

      public JDK8HackAlpnProvider()
  • Method Details

    • isEnabled

      public boolean isEnabled(SSLEngine sslEngine)
      Specified by:
      isEnabled in interface ALPNProvider
    • setProtocols

      public SSLEngine setProtocols(SSLEngine engine, String[] protocols)
      Description copied from interface: ALPNProvider
      Sets the SSL protocols, and potentially wraps the SSLEngine
      Specified by:
      setProtocols in interface ALPNProvider
      Parameters:
      engine - The original engine
      protocols - The protocols
      Returns:
      The new SSLEngine
    • getSelectedProtocol

      public String getSelectedProtocol(SSLEngine engine)
      Description copied from interface: ALPNProvider
      Gets the selected ALPN protocol, of null if none was selected.
      Specified by:
      getSelectedProtocol in interface ALPNProvider
      Parameters:
      engine - The SSL Engine
      Returns:
      The selected protocol
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface ALPNProvider
      Returns:
      The priority of this provider, higher priority providers will be tried first
    • toString

      public String toString()
      Overrides:
      toString in class Object