code: public void setProtocols(List<Protocol> protocols) {
      protocols = Util.immutableList(protocols);
      if (protocols.contains(Protocol.H2_PRIOR_KNOWLEDGE) && protocols.size() > 1) {
        // when using h2_prior_knowledge, no other protocol should be supported.
        throw new IllegalArgumentException(
            "protocols containing h2_prior_knowledge cannot use other protocols: " + protocols);
      } else if (!protocols.contains(Protocol.H2_PRIOR_KNOWLEDGE)
          && !protocols.contains(Protocol.HTTP_1_1)) {
        throw new IllegalArgumentException("protocols doesn't contain http/1.1: " + protocols);
      }
      if (protocols.contains(null)) {
        throw new IllegalArgumentException("protocols must not contain null");
      }
      this.protocols = protocols;
    }
docs: Indicates the protocols supported by ALPN on incoming HTTPS connections. This list is ignored
  when {@link #setProtocolNegotiationEnabled negotiation is disabled}.
  
  @param protocols the protocols to use, in order of preference. The list must contain
  {@linkplain Protocol#HTTP_1_1}. It must not contain null.