code: public static WebSocketFactory createWebSocketFactory() {
          Class<WebSocketFactory>         clazz = WebSocketFactory.class;
          ServiceLoader<WebSocketFactory> loader = ServiceLoader.load(clazz);
          return loader.iterator().next();    
      }
docs: Creates and returns a new instance of the default implementation of the
  {@link WebSocketFactory}.
  
  @return WebSocketFactory