code: private boolean notifyPersistentConnectionListener(HttpMessage httpMessage, Socket inSocket, ZapGetMethod method) {
          boolean keepSocketOpen = false;
          PersistentConnectionListener listener = null;
          synchronized (persistentConnectionListener) {
              for (int i = 0; i < persistentConnectionListener.size(); i++) {
                  listener = persistentConnectionListener.get(i);
                  try {
                      if (listener.onHandshakeResponse(httpMessage, inSocket, method)) {
                          // inform as long as one listener wishes to overtake the connection
                          keepSocketOpen = true;
                          break;
                      }
                  } catch (Exception e) {
                      logger.warn(e.getMessage(), e);
                  }
              }
          }
  
          return keepSocketOpen;
      }
docs: Go thru each listener and offer him to take over the connection. The
  first observer that returns true gets exclusive rights.
  
  @param httpMessage Contains HTTP request & response.
  @param inSocket Encapsulates the TCP connection to the browser.
  @param method Provides more power to process response.
  
  @return Boolean to indicate if socket should be kept open.