Package org.gudy.azureus2.core3.peer

Examples of org.gudy.azureus2.core3.peer.PEPeer


              String configAutoKey = TransferSpeedValidator.getActiveAutoUploadParameter(globalManager);

              COConfigurationManager.setParameter(configAutoKey, false);
            }

            final int cValue = ((Integer) new TransferSpeedValidator(configKey,
                new Integer(newSpeed)).getValue()).intValue();

            COConfigurationManager.setParameter(configKey, cValue);

            COConfigurationManager.save();
View Full Code Here


                              TransferSpeedValidator.getActiveAutoUploadParameter(globalManager);
              
                            COConfigurationManager.setParameter( configAutoKey, false );
                          }
                         
                          final int cValue = ((Integer)new TransferSpeedValidator(configKey, (Number)items[i].getData("maxkb")).getValue()).intValue();
                          COConfigurationManager.setParameter(configKey, cValue);
                         

                          COConfigurationManager.save();
                      }
View Full Code Here

    List<SelectedContent> listSelected = new ArrayList<SelectedContent>(dataSources.length);
    for (Object ds : dataSources) {
      if (ds instanceof DownloadManager) {
        listSelected.add(new SelectedContent((DownloadManager) ds));
      } else if (ds instanceof DiskManagerFileInfo) {
        DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) ds;
        listSelected.add(new SelectedContent(fileInfo.getDownloadManager(), fileInfo.getIndex()));
      }
    }
    SelectedContent[] content = listSelected.toArray(new SelectedContent[0]);
    SelectedContentManager.changeCurrentlySelectedContent(tv.getTableID(), content, tv);
  }
View Full Code Here

    if (dms.length == 0 && dataSources.length > 0) {
      List<DiskManagerFileInfo> listFileInfos = new ArrayList<DiskManagerFileInfo>();
      DownloadManager firstFileDM = null;
      for (Object ds : dataSources) {
        if (ds instanceof DiskManagerFileInfo) {
          DiskManagerFileInfo info = (DiskManagerFileInfo) ds;
          // for now, FilesViewMenuUtil.fillmenu can only handle one DM
          if (firstFileDM != null && !firstFileDM.equals(info.getDownloadManager())) {
            break;
          }
          firstFileDM = info.getDownloadManager();
          listFileInfos.add(info);
        }
      }
      if (listFileInfos.size() > 0) {
        FilesViewMenuUtil.fillMenu(tv, menu, firstFileDM,
View Full Code Here

                    sb.append('\n');
                  } catch (TOTorrentException e) {
                  }
                }
              } else if (ds instanceof DiskManagerFileInfo) {
                DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) ds;
                DownloadManager dm = fileInfo.getDownloadManager();
                TOTorrent torrent = dm.getTorrent();
                if (torrent != null) {
                  try {
                    sb.append(torrent.getHashWrapper().toBase32String());
                    sb.append(';');
                    sb.append(fileInfo.getIndex());
                    sb.append('\n');
                    onlyDMs = false;
                  } catch (TOTorrentException e) {
                  }
                }
View Full Code Here

      if (fileInfos != null) {
        DiskManagerFileInfo[] files = fileInfos.getFiles();
        boolean copied = false;
        int pos = 0;
        for (int i = 0; i < files.length; i++) {
          DiskManagerFileInfo fileInfo = files[i];
          if (fileInfo.isSkipped()
              && (fileInfo.getStorageType() == DiskManagerFileInfo.ST_COMPACT || fileInfo.getStorageType() == DiskManagerFileInfo.ST_REORDER_COMPACT)) {
            continue;
          }
          if (pos != i) {
            if ( !copied ){
                // we *MUSTN'T* modify the returned array!!!!
View Full Code Here

    DownloadManager dm = (DownloadManager) ds;
    if (rowCore.getSubItemCount() == 0 && dm.getTorrent() != null
        && !dm.getTorrent().isSimpleTorrent() && rowCore.isVisible()
        && dm.getNumFileInfos() > 0) {
      DiskManagerFileInfoSet fileInfos = dm.getDiskManagerFileInfoSet();
      if (fileInfos != null) {
        DiskManagerFileInfo[] files = fileInfos.getFiles();
        boolean copied = false;
        int pos = 0;
        for (int i = 0; i < files.length; i++) {
          DiskManagerFileInfo fileInfo = files[i];
          if (fileInfo.isSkipped()
View Full Code Here

  public static DiskManager
  create(
    TOTorrent    torrent,
    DownloadManager manager)
  {
    DiskManagerImpl dm = new DiskManagerImpl( torrent, manager );
   
    if ( dm.getState() != DiskManager.FAULTY ){
     
      dm.start();
    }
   
    return dm;
  }
View Full Code Here

        }
        CategoryManager.addCategoryManagerListener(MyTorrentsView.this);
        globalManager.addListener(MyTorrentsView.this, false);
        DownloadManager[] dms = (DownloadManager[]) globalManager.getDownloadManagers().toArray(new DownloadManager[0]);
        for (int i = 0; i < dms.length; i++) {
          DownloadManager dm = dms[i];
          dm.addListener(MyTorrentsView.this);
          if (!isOurDownloadManager(dm)) {
            dms[i] = null;
          }
        }
        tv.addDataSources(dms);
View Full Code Here

        }
      }
    });
    Object[] dms = globalManager.getDownloadManagers().toArray();
    for (int i = 0; i < dms.length; i++) {
      DownloadManager dm = (DownloadManager) dms[i];
      dm.removeListener(this);
    }
    if (currentCategory != null) {
      currentCategory.removeCategoryListener(this);
    }
    CategoryManager.removeCategoryManagerListener(this);
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.peer.PEPeer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.