Package org.gudy.azureus2.core3.torrentdownloader

Examples of org.gudy.azureus2.core3.torrentdownloader.TorrentDownloader


        downloaders.clear();
      }
     
      if (to_cancel.size() > 0){
        for (Iterator iter = to_cancel.iterator(); iter.hasNext();) {
          TorrentDownloader element = (TorrentDownloader) iter.next();
          element.cancel();
        }
      }

      for (Iterator iter = torrentList.iterator(); iter.hasNext();) {
        TorrentInfo info = (TorrentInfo) iter.next();
View Full Code Here


   * @param url
   * @param outputDir
   */
  public void downloadRemoteTorrent( String url, final String outputDir )
  {
    TorrentDownloader downloader = TorrentDownloaderFactory.create(new TorrentDownloaderCallBackInterface() {
      public void TorrentDownloaderEvent(int state, TorrentDownloader inf) {
        if( state == TorrentDownloader.STATE_FINISHED )
        {
          out.println("torrent file download complete. starting torrent");
          TorrentDownloaderManager.getInstance().remove(inf);
View Full Code Here

    out.println("Torrent Filename: " + dm.getTorrentFileName());
    out.println("Saving to: " + dm.getSaveLocation());
    out.println("Created By: " + dm.getTorrentCreatedBy());
    out.println("Comment: " + dm.getTorrentComment());
    out.println("- Tracker Info -");
    TRTrackerAnnouncer trackerclient = dm.getTrackerClient();
    if (trackerclient != null) {
      out.println("URL: " + trackerclient.getTrackerURL());
      String timestr;
      try {
        int time = trackerclient.getTimeUntilNextUpdate();
        if (time < 0) {
          timestr = MessageText.getString("GeneralView.label.updatein.querying");
        } else {
          int minutes = time / 60;
          int seconds = time % 60;
          String strSeconds = "" + seconds;
          if (seconds < 10) {
            strSeconds = "0" + seconds; //$NON-NLS-1$
          }
          timestr = minutes + ":" + strSeconds;
        }
      } catch (Exception e) {
        timestr = "unknown";
      }
      out.println("Time till next Update: " + timestr);
      out.println("Status: " + trackerclient.getStatusString());
    } else
      out.println("  Not available");
   
    out.println("- Files Info -");
    DiskManagerFileInfo files[] = dm.getDiskManagerFileInfo();
View Full Code Here

          return "";
        return "(max " + DisplayFormatters.formatByteCountToKiBEtcPerSec(uploadSpeed) + ")";
       
      case 'S':
      case 'P':
        TRTrackerScraperResponse hd = dm.getTrackerScrapeResponse();
        if (hd == null || !hd.isValid())
          return "?";
        else
        {
          if( variable == 'S' )
            return Integer.toString(hd.getSeeds());
          else
            return Integer.toString(hd.getPeers());
        }
      default:
        return "??" + variable + "??";
    }
  }
View Full Code Here

  protected boolean performCommand(ConsoleInput ci, DownloadManager dm, List args) {
    TOTorrent torrent = dm.getTorrent();
        if (torrent != null) {
          try {
          TRHost  host = ci.azureus_core.getTrackerHost();
         
          TRHostTorrent  existing = host.getHostTorrent( torrent );
         
          if ( existing == null ){
           
            host.publishTorrent(torrent);
          }else{
            try{
              existing.remove();
             
            }catch( Throwable e ){
View Full Code Here

    TOTorrent torrent = dm.getTorrent();
        if (torrent != null) {
          try {
          TRHost  host = ci.azureus_core.getTrackerHost();
         
          TRHostTorrent  existing = host.getHostTorrent( torrent );
         
          if ( existing == null ){
           
            host.publishTorrent(torrent);
          }else{
            try{
              existing.remove();
             
            }catch( Throwable e ){
             
              e.printStackTrace();
            }
View Full Code Here

    }
   
    final trustDialog[]  dialog = new trustDialog[1];
   
    try{
      Utils.execSWTThread(new AERunnable() {
            public void
            runSupport()
            {
              dialog[0] = new trustDialog( display, resource, cert );
            }
View Full Code Here

      return;
    }
   
    try{
      display.asyncExec(
          new AERunnable()
          {
            public void
            runSupport()
            {
               new createDialog( display );
View Full Code Here

    if (logAlert.details != null) {
      text += "\n<A HREF=\"details\">" + MessageText.getString("v3.MainWindow.button.viewdetails") + "</A>";
    }

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        openWindow();
      }
    });
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.ui.IStartup#earlyStartup()
   */
  public void earlyStartup() {
    final Display display = Display.getDefault();
    display.syncExec(new AERunnable() {
      public void runSupport() {
        hookApplicationMenu(display);
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.torrentdownloader.TorrentDownloader

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.