Examples of DownloadManager


Examples of org.gudy.azureus2.core3.download.DownloadManager

     
      piecesImage = new Image(SWTThread.getInstance().getDisplay(), newWidth, newHeight);
      final GC gcImage = new GC(piecesImage);
     
      // dm may be null if this is a skeleton file view
      DownloadManager download_manager = fileInfo.getDownloadManager();
      PEPeerManager peer_manager = download_manager == null ? null : download_manager.getPeerManager();
      PEPiece[] pe_pieces = peer_manager == null ? null : peer_manager.getPieces();
      final long now = SystemTime.getCurrentTime();
     
      if (fileInfo != null && manager != null)
      {
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

    if ( file == null ){
     
      return;
    }
   
    DownloadManager  download_manager = file.getDownloadManager();

    if ( download_manager == null ){
     
      return;
    }
   
    DiskManager    disk_manager = download_manager.getDiskManager();
    PEPeerManager  peer_manager = download_manager.getPeerManager();

    if (disk_manager == null || peer_manager == null ){
     
      return;
    }
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

    if (img != null && !img.isDisposed()) {
      img.dispose();
      img = null;
    }

    DownloadManager  download_manager = file==null?null:file.getDownloadManager();
   
    DiskManager    disk_manager = download_manager==null?null:download_manager.getDiskManager();
    PEPeerManager  peer_manager = download_manager==null?null:download_manager.getPeerManager();
   
    if ( file == null || disk_manager == null || peer_manager == null ) {
      GC gc = new GC(fileInfoCanvas);
      gc.fillRectangle(bounds);
      gc.dispose();
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

      int    value )
    {
      if ( key == MAX_UPLOAD ){
        for (int i=0;i<managers.length;i++){

          DownloadManager  manager = managers[i];
           
          if ( value != manager.getStats().getUploadRateLimitBytesPerSecond()/1024){
           
            manager.getStats().setUploadRateLimitBytesPerSecond(value*1024);
          }
        }
      }else if ( key == MAX_DOWNLOAD ){
        for (int i=0;i<managers.length;i++){

          DownloadManager  manager = managers[i];
           
          if ( value != manager.getStats().getDownloadRateLimitBytesPerSecond()/1024){
           
            manager.getStats().setDownloadRateLimitBytesPerSecond(value*1024);
          }
        }
      }else{
        Debug.out( "Unknown key '" + key + "'" );
      }
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

      String  key,
      int    value )
    {
      for (int i=0;i<managers.length;i++){

        DownloadManager  manager = managers[i];
       
        if ( value != manager.getDownloadState().getIntParameter( key )){
       
          manager.getDownloadState().setIntParameter( key, value );
        }
      }
    } 
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

      String    key,
      boolean    value )
    {
      for (int i=0;i<managers.length;i++){

        DownloadManager  manager = managers[i];
       
        if ( value != manager.getDownloadState().getBooleanParameter( key )){
       
          manager.getDownloadState().setBooleanParameter( key, value );
        }
      }
    }
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

                try {
                  hash = torrent.getHash();
                } catch (TOTorrentException e1) {
                }

                DownloadManager dm = core.getGlobalManager().addDownloadManager(
                    torrent_file.toString(),
                    hash,
                    save_dir.toString(),
                    default_start_stopped ? DownloadManager.STATE_STOPPED
                        : DownloadManager.STATE_QUEUED, true, // persistent
                    true, // for seeding
                    null); // no adapter required

                if (!default_start_stopped && dm != null) {
                  // We want this to move to seeding ASAP, so move it to the top
                  // of the download list, where it will do the quick check and
                  // move to the seeding list
                  // (the for seeding flag should really be smarter and verify
                  //  it's a seeding torrent and set appropriately)
                  dm.getGlobalManager().moveTop(new DownloadManager[] {
                    dm
                  });
                }

                if (_wizard.autoHost
View Full Code Here

Examples of org.gudy.azureus2.core3.download.DownloadManager

  }

 
  // @see com.aelitis.azureus.ui.common.table.TableDataSourceChangedListener#tableDataSourceChanged(java.lang.Object)
  public void tableDataSourceChanged(Object newDataSource) {
    DownloadManager old_manager = manager;
    if (newDataSource == null)
      manager = null;
    else if (newDataSource instanceof Object[])
      manager = (DownloadManager)((Object[])newDataSource)[0];
    else
      manager = (DownloadManager)newDataSource;
   
    if (old_manager != null) {
      old_manager.getDownloadState().removeListener(this, DownloadManagerState.AT_FILE_LINKS, DownloadManagerStateAttributeListener.WRITTEN);
    }
    if (manager != null) {
      manager.getDownloadState().addListener(this, DownloadManagerState.AT_FILE_LINKS, DownloadManagerStateAttributeListener.WRITTEN);
    }
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadManager

      // However, check just in case
      AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
     
        public void azureusCoreRunning(AzureusCore core) {
         
          DownloadManager dm = PluginInitializer.getDefaultInterface().getDownloadManager();
         
          dm.addListener( DeviceUPnPImpl.this, true );
        }
      });
    }
       
    addListener( this );
View Full Code Here

Examples of org.hive2hive.core.network.data.download.DownloadManager

    File file = new File(root, fileName);
    FileUtils.writeStringToFile(file, NetworkTestUtil.randomString());

    PublicKeyManager publicKeyManager = new PublicKeyManager("user", EncryptionUtil.generateRSAKeyPair(),
        null);
    DownloadManager downloadManager = new DownloadManager(null, null, publicKeyManager, null);
    FileUtil.writePersistentMetaData(root.toPath(), publicKeyManager, downloadManager);
    PersistentMetaData persistentMetaData = FileUtil.readPersistentMetaData(root.toPath());
    Map<String, byte[]> fileTree = persistentMetaData.getFileTree();
    Assert.assertTrue(fileTree.containsKey(fileName));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.