Interface AlpnServerNegotiator

All Superinterfaces:
BiFunction<SSLEngine,List<String>,String>

public interface AlpnServerNegotiator extends BiFunction<SSLEngine,List<String>,String>

Called during the SSL handshake when the current SSLEngine's getUseClientMode has returned false. Implementations must be thread safe. For HTTP/2, implementations must recognize "h2" and "http/1.1" protocol identifiers, without the quotes.

  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    apply(SSLEngine sslEngine, List<String> clientProtocols)
     
    selectProtocol(SSLEngine sslEngine, String[] clientProtocols)
    Take the necessary actions to declare support for the above protocols and return the selected protocol.

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • selectProtocol

      String selectProtocol(SSLEngine sslEngine, String[] clientProtocols)

      Take the necessary actions to declare support for the above protocols and return the selected protocol.

      Parameters:
      sslEngine - the SSLEngine for this connection.
      clientProtocols - the available client protocols
      Returns:
      the selected protocol.
    • apply

      default String apply(SSLEngine sslEngine, List<String> clientProtocols)
      Specified by:
      apply in interface BiFunction<SSLEngine,List<String>,String>