List of usage examples for io.netty.handler.ssl ApplicationProtocolNegotiator protocols
List<String> protocols();
From source file:io.grpc.netty.GrpcSslContexts.java
License:Apache License
@SuppressWarnings("deprecation") static void ensureAlpnAndH2Enabled(io.netty.handler.ssl.ApplicationProtocolNegotiator alpnNegotiator) { checkArgument(alpnNegotiator != null, "ALPN must be configured"); checkArgument(alpnNegotiator.protocols() != null && !alpnNegotiator.protocols().isEmpty(), "ALPN must be enabled and list HTTP/2 as a supported protocol."); checkArgument(alpnNegotiator.protocols().contains(HTTP2_VERSION), "This ALPN config does not support HTTP/2. Expected %s, but got %s'.", HTTP2_VERSION, alpnNegotiator.protocols()); }