code: public void setSubProtocols(String[] subProtocols) {
          if (subProtocols == null || subProtocols.length == 0) {
              this.subProtocols = null;
              return;
          }
          this.subProtocols = Arrays.asList(subProtocols);
      }
docs: Add sub protocols.
  
  @param subProtocols a array of sub protocols.