Esempio n. 1
0
 private void internalHandleUnregister(
     SockJSSocket sock, String address, Map<String, Handler<Message>> handlers) {
   if (handleUnregister(sock, address)) {
     Handler<Message> handler = handlers.remove(address);
     if (handler != null) {
       eb.unregisterHandler(address, handler);
     }
   }
 }
 @Override
 public void stop() throws Exception {
   if (!isStarted) {
     return;
   }
   eventBus.unregisterHandler(vertxAddress, handler);
   platformManager.stop();
   System.clearProperty("vertx.clusterManagerFactory");
   isStarted = false;
   ActiveMQVertxLogger.LOGGER.debug(connectorName + ": stopped");
 }
Esempio n. 3
0
  private void handleSocketClosed(SockJSSocket sock, Map<String, Handler<Message>> handlers) {
    // On close unregister any handlers that haven't been unregistered
    for (Map.Entry<String, Handler<Message>> entry : handlers.entrySet()) {
      // call hook
      handleUnregister(sock, entry.getKey());
      eb.unregisterHandler(entry.getKey(), entry.getValue());
    }

    // Close any cached authorisations for this connection
    Set<String> auths = sockAuths.remove(sock);
    if (auths != null) {
      for (String sessionID : auths) {
        Auth auth = authCache.remove(sessionID);
        if (auth != null) {
          auth.cancel();
        }
      }
    }
    handleSocketClosed(sock);
  }