/**
   * Closes given {@link #transportManagers} of this <tt>Conference</tt> and removes corresponding
   * channel bundle.
   */
  void closeTransportManager(TransportManager transportManager) {
    synchronized (transportManagers) {
      for (Iterator<IceUdpTransportManager> i = transportManagers.values().iterator();
          i.hasNext(); ) {
        if (i.next() == transportManager) {
          i.remove();
          // Presumably, we have a single association for
          // transportManager.
          break;
        }
      }

      // Close manager
      try {
        transportManager.close();
      } catch (Throwable t) {
        logger.warn(
            "Failed to close an IceUdpTransportManager of" + " conference " + getID() + "!", t);
        // The whole point of explicitly closing the
        // transportManagers of this Conference is to prevent memory
        // leaks. Hence, it does not make sense to possibly leave
        // TransportManagers open because a TransportManager has
        // failed to close.
        if (t instanceof InterruptedException) Thread.currentThread().interrupt();
        else if (t instanceof ThreadDeath) throw (ThreadDeath) t;
      }
    }
  }
  /** Closes the {@link #transportManagers} of this <tt>Conference</tt>. */
  private void closeTransportManagers() {
    synchronized (transportManagers) {
      for (Iterator<IceUdpTransportManager> i = transportManagers.values().iterator();
          i.hasNext(); ) {
        IceUdpTransportManager transportManager = i.next();

        i.remove();
        closeTransportManager(transportManager);
      }
    }
  }
예제 #3
0
 private void nudge() {
   for (Iterator<RecorderEvent> iter = pendingEvents.iterator(); iter.hasNext(); ) {
     RecorderEvent ev = iter.next();
     long instant = getSynchronizer().getLocalTime(ev.getSsrc(), ev.getRtpTimestamp());
     if (instant != -1) {
       iter.remove();
       ev.setInstant(instant);
       handler.handleEvent(ev);
     }
   }
 }
 /**
  * Registers or unregister as a popup message listener to detect when a user click on
  * notification saying that the device configuration has changed.
  *
  * @param enable True to register to the popup message notifcation handler. False to unregister.
  */
 public void managePopupMessageListenerRegistration(boolean enable) {
   Iterator<NotificationHandler> notificationHandlers =
       notificationService
           .getActionHandlers(
               net.java.sip.communicator.service.notification.NotificationAction
                   .ACTION_POPUP_MESSAGE)
           .iterator();
   NotificationHandler notificationHandler;
   while (notificationHandlers.hasNext()) {
     notificationHandler = notificationHandlers.next();
     if (notificationHandler instanceof PopupMessageNotificationHandler) {
       // Register.
       if (enable) {
         //                        ((PopupMessageNotificationHandler) notificationHandler)
         //                            .addPopupMessageListener(this);
       }
       // Unregister.
       else {
         //                        ((PopupMessageNotificationHandler) notificationHandler)
         //                            .removePopupMessageListener(this);
       }
     }
   }
 }