Examples of Tracker


Examples of org.gudy.azureus2.plugins.tracker.Tracker

          try{
            PluginInterface pi = AzureusCoreFactory.getSingleton().getPluginManager().getDefaultPluginInterface();
           
            ShareManager sm = pi.getShareManager();
           
            Tracker  tracker = pi.getTracker();
           
            ShareResource[] shares = sm.getShares();
           
            TOTorrent torrent = dm.getTorrent();
           
            byte[] target_hash = torrent.getHash();
           
            for ( ShareResource share: shares ){
             
              int type = share.getType();
             
              byte[] hash;
             
              if ( type == ShareResource.ST_DIR ){
               
                hash = ((ShareResourceDir)share).getItem().getTorrent().getHash();
               
              }else if ( type == ShareResource.ST_FILE ){
               
                hash = ((ShareResourceFile)share).getItem().getTorrent().getHash();
               
              }else{
               
                hash = null;
              }
             
              if ( hash != null ){
               
                if ( Arrays.equals( target_hash, hash )){
                 
                  try{
                    dm.stopIt( DownloadManager.STATE_STOPPED, false, false );
                   
                  }catch( Throwable e ){
                  }
                 
                 
                  try{
                        TrackerTorrent  tracker_torrent = tracker.getTorrent( PluginCoreUtils.wrap( torrent ));

                        if ( tracker_torrent != null ){
                         
                          tracker_torrent.stop();
                        }
View Full Code Here

Examples of org.gudy.azureus2.plugins.tracker.Tracker

      {
       
        if(refresh_button.getSelection())
        {
               
          final Tracker tracker = pluginInterface.getTracker();
               
                dm = pluginInterface.getDownloadManager()
                dml = new DownloadManagerListener()
                {
                    public void downloadAdded(Download download)
                    {
                        Torrent dm_torrent = download.getTorrent();
                        try
                        {
                            tracker.host(dm_torrent, true);
                           
                        }
                        catch (TrackerException e)
                        {
                           System.out.println("Hosting of " + dm_torrent.getName() + " failed");
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.