code: private static Collection<String> toHttpBalancerURIs(Collection<String> uris,
                                                        AcceptOptionsContext acceptOptionsCtx,
                                                        TransportFactory transportFactory) throws Exception {
          List<String> httpURIs = new ArrayList<>(uris.size());
          for (String uri : uris) {
              Protocol protocol = transportFactory.getProtocol(getScheme(uri));
              boolean secure = protocol.isSecure();
  
              for ( int i = 0; i < HTTP_TRANSPORTS.size(); i+=2) {
                  String httpScheme = secure ? HTTP_TRANSPORTS.get(i) : HTTP_TRANSPORTS.get(i+1); // "httpxe+ssl" : "httpxe";
                  String httpAuthority = getAuthority(uri);
                  String httpPath = getPath(uri);
                  String httpQuery = getQuery(uri);
                  if (WsProtocol.WS.equals(protocol) || WsProtocol.WSS.equals(protocol)) {
                      httpURIs.add(buildURIAsString(httpScheme, httpAuthority,
                      URLUtils.replaceMultipleSlashesWithSingleSlash(httpPath + WsebAcceptor.EMULATED_SUFFIX), httpQuery, null));
  
                      // ensure that the accept-options is updated with bindings if they exist for ws and/or wss
                      // so that the Gateway binds to the correct host:port as per the service configuration.
                      String internalURI = acceptOptionsCtx.getInternalURI(uri);
                      if ((internalURI != null) && !internalURI.equals(uri)) {
                          String authority = getAuthority(internalURI);
                          acceptOptionsCtx.addBind(httpScheme, authority);
                      }
                  }
                  else if (SseProtocol.SSE.equals(protocol) || SseProtocol.SSE_SSL.equals(protocol) ||
                           HttpProtocol.HTTP.equals(protocol) || HttpProtocol.HTTPS.equals(protocol)) {
                      httpURIs.add(buildURIAsString(httpScheme, httpAuthority, httpPath, httpQuery, null));
                  }
                  else {
                      // we do not balance anything other than http, ws and sse
                      throw new IllegalArgumentException("Invalid protocol in the balancer: " + uri);
                  }
              }
          }
          return httpURIs;
      }
docs: Converts a collection of WS URIs to their equivalent HTTP(S) balancer URIs.
  
  @param uris
  the URIs to convert
  @return the converted URIs
  @throws Exception