/** {@inheritDoc} */
 @Override
 public final void onSuccess(WebSocket webSocket) {
   this.webSocket = webSocket;
   for (WebSocketListener listener : listeners) {
     webSocket.addWebSocketListener(listener);
     listener.onOpen(webSocket);
   }
   ok.set(true);
 }
 /** {@inheritDoc} */
 @Override
 public final void onSuccess(WebSocket webSocket) {
   this.webSocket = webSocket;
   for (WebSocketListener listener : listeners) {
     webSocket.addWebSocketListener(listener);
     listener.onOpen(webSocket);
   }
   if (isNonEmpty(bufferedFrames)) {
     for (Runnable bufferedFrame : bufferedFrames) {
       bufferedFrame.run();
     }
     bufferedFrames = null;
   }
   ok.set(true);
 }