Examples of TRHostTorrent


Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

    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

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

    }
  }

  // @see com.aelitis.azureus.ui.common.table.TableSelectionListener#defaultSelected(com.aelitis.azureus.ui.common.table.TableRowCore[])
  public void defaultSelected(TableRowCore[] rows, int stateMask) {
    final TRHostTorrent torrent = (TRHostTorrent) tv.getFirstSelectedDataSource();
    if (torrent == null)
      return;
    CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
   
      public void azureusCoreRunning(AzureusCore core) {
        DownloadManager dm = core.getGlobalManager().getDownloadManager(
            torrent.getTorrent());
        if (dm != null) {
          UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
          if (uiFunctions != null) {
            uiFunctions.openView(UIFunctions.VIEW_DM_DETAILS, dm);
          }
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

      boolean  stop_ok    = true;
      boolean  remove_ok  = true;
     
      for (int i = 0; i < hostTorrents.length; i++) {
       
        TRHostTorrent  host_torrent = (TRHostTorrent)hostTorrents[i];
       
        int  status = host_torrent.getStatus();
       
        if ( status != TRHostTorrent.TS_STOPPED ){
         
          start_ok  = false;
         
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

     
      if (row == null){
        continue;
      }
     
      TRHostTorrent  host_torrent = (TRHostTorrent)rows[x].getDataSource(true);
     
      if (host_torrent == null){
        continue;
      }
     
      long  uploaded  = host_torrent.getTotalUploaded();
      long  downloaded  = host_torrent.getTotalDownloaded();
      long  left    = host_torrent.getTotalLeft();

      int    seed_count  = host_torrent.getSeedCount();

      host_torrent.setData("GUI_PeerCount", new Long(host_torrent.getLeecherCount()));
      host_torrent.setData("GUI_SeedCount", new Long(seed_count));
      host_torrent.setData("GUI_BadNATCount", new Long(host_torrent.getBadNATCount()));
      host_torrent.setData("GUI_Uploaded", new Long(uploaded));
      host_torrent.setData("GUI_Downloaded", new Long(downloaded));
      host_torrent.setData("GUI_Left", new Long(left));

      if ( seed_count != 0 ){
        Color fg = row.getForeground();
       
        if (fg != null && fg.equals(Colors.blues[Colors.BLUES_MIDDARK])) {
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

    boolean start = false, stop = false, remove = false;
    Object[] hostTorrents = tv.getSelectedDataSources().toArray();
    if (hostTorrents.length > 0) {
      remove = true;
      for (int i = 0; i < hostTorrents.length; i++) {
        TRHostTorrent  host_torrent = (TRHostTorrent)hostTorrents[i];
       
        int  status = host_torrent.getStatus();
       
        if ( status == TRHostTorrent.TS_STOPPED ){         
          start  = true;         
        }
       
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

  }
 
  private void stopSelectedTorrents() {
    tv.runForSelectedRows(new TableGroupRowRunner() {
      public void run(TableRowCore row) {
        TRHostTorrent  torrent = (TRHostTorrent)row.getDataSource(true);
        if (torrent.getStatus() == TRHostTorrent.TS_STARTED)
          torrent.stop();
      }
    });
  }
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

  }
 
  private void startSelectedTorrents() {
    tv.runForSelectedRows(new TableGroupRowRunner() {
      public void run(TableRowCore row) {
        TRHostTorrent  torrent = (TRHostTorrent)row.getDataSource(true);
        if (torrent.getStatus() == TRHostTorrent.TS_STOPPED)
          torrent.start();
      }
    });
  }
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

  }
 
  private void removeSelectedTorrents() {
    tv.runForSelectedRows(new TableGroupRowRunner() {
      public void run(TableRowCore row) {
        TRHostTorrent  torrent = (TRHostTorrent)row.getDataSource(true);
        try{
          torrent.remove();
         
        }catch( TRHostTorrentRemovalVetoException f ){
         
          Logger.log(new LogAlert(torrent, false,
              "{globalmanager.download.remove.veto}", f));
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

  private void assignSelectedToCategory(final AzureusCore core,
      final Category category) {
    tv.runForSelectedRows(new TableGroupRowRunner() {
      public void run(TableRowCore row) {
       
      TRHostTorrent  tr_torrent = (TRHostTorrent)row.getDataSource(true);
   
    final TOTorrent  torrent = tr_torrent.getTorrent();
   
    DownloadManager dm = core.getGlobalManager().getDownloadManager( torrent );

    if ( dm != null ){
     
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

  }
 
  public void
  refresh(TableCell cell)
  {
      TRHostTorrent tr_torrent = (TRHostTorrent)cell.getDataSource();
   
    if ( tr_torrent == null ){
     
      cell.setText("");
     
    }else{
     
      TOTorrent  torrent = tr_torrent.getTorrent();
     
      if (gm == null) {
        if (AzureusCoreFactory.isCoreRunning()) {
          return;
        }
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.