/**
   * 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;
      }
    }
  }
예제 #2
0
 private void showExternalDownloadItems() {
   final Map<String, FcpPersistentGet> items = persistentQueue.getDownloadRequests();
   for (final FcpPersistentGet downloadRequest : items.values()) {
     if (!downloadModelItems.containsKey(downloadRequest.getIdentifier())) {
       addExternalItem(downloadRequest);
     }
   }
 }
예제 #3
0
    /**
     * Set the display.
     *
     * @throws RemoteException Java RMI error
     * @throws VisADException problem creating VisAD object
     */
    protected synchronized void setDisplay() throws VisADException, RemoteException {

      for (Iterator iter = map.values().iterator(); iter.hasNext(); ) {
        ((ScalarMapAdapter) iter.next()).setDisplay();
      }

      changed = false;
    }
  /** 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);
      }
    }
  }