Package org.glassfish.grizzly.npn
Interface AlpnClientNegotiator
public interface AlpnClientNegotiator
Called during the SSL handshake when the current SSLEngine's
getUseClientMode has returned true. Implementations must be
thread safe.
-
Method Summary
Modifier and TypeMethodDescriptionString[]getProtocols(SSLEngine sslEngine) Return the supported protocols.voidprotocolSelected(SSLEngine sslEngine, String selectedProtocol) Inform the implementor which of the protocols returned fromgetProtocols(javax.net.ssl.SSLEngine)was actually selected.
-
Method Details
-
getProtocols
Return the supported protocols. For HTTP/2 this should be the two literal strings "h2" and "http/1.1", without the quotes. This method is called by the underlying SSL framework.
- Parameters:
sslEngine- theSSLEnginefor this connection.- Returns:
- A newly allocated String array of protocols supported.
-
protocolSelected
Inform the implementor which of the protocols returned from
getProtocols(javax.net.ssl.SSLEngine)was actually selected.For HTTP/2, if the argument is "h2", proceed to use the HTTP/2 protocol for the remainder of this connection. Otherwise, take the necessary action to use HTTP/1.1.
- Parameters:
sslEngine- theSSLEnginefor this connection.selectedProtocol- The selected protocol.
-