Пример #1
0
  public void onThrowable(AtmosphereResourceEvent event) {
    // called when a push connection is broken

    try {
      JSONObject dim = (JSONObject) event.getMessage();
      internalNotifySchedule.pushNotAtendedNotification(dim);
      logger.info("Sending again the Notification: " + dim);

    } catch (Exception e) {
      logger.debug("Not correct message!");
    }

    event.broadcaster().destroy();
    internalNotifySchedule.removeBroadcaster(event.broadcaster());

    if (logger.isDebugEnabled()) {
      logger.error("Atmosphere connection broken: " + event);
    } else {
      logger.warn("Atmosphere connection broken: " + event.getMessage());
    }
  }
Пример #2
0
 public void onDisconnect(AtmosphereResourceEvent event) {
   event.broadcaster().destroy();
   internalNotifySchedule.removeBroadcaster(event.broadcaster());
   logger.info("onDisconnect: " + event);
 }