code: public static <I, O> RequestHandler<I, O> acceptAllUpgrades(final WebSocketHandler handler) {
          return new RequestHandler<I, O>() {
              @Override
              public Observable<Void> handle(HttpServerRequest<I> request, HttpServerResponse<O> response) {
                  if (request.isWebSocketUpgradeRequested()) {
                      return response.acceptWebSocketUpgrade(handler);
                  }
  
                  return response.setStatus(HttpResponseStatus.NOT_FOUND)
                                 .write(Observable.<O>empty());
              }
          };
      }
docs: Returns a {@link RequestHandler} that accepts all WebSocket upgrade requests by delegating it to the passed
  handler but sends an HTTP 404 response for all other requests.
  
  @param handler Web Socket handler for all web socket upgrade requests.
  
  @return request handler.